StringUtils.java

1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *      http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 */
17
package org.apache.commons.lang3;
18
19
import java.io.UnsupportedEncodingException;
20
import java.nio.charset.Charset;
21
import java.text.Normalizer;
22
import java.util.ArrayList;
23
import java.util.Arrays;
24
import java.util.Iterator;
25
import java.util.List;
26
import java.util.Locale;
27
import java.util.Objects;
28
import java.util.regex.Pattern;
29
30
/**
31
 * <p>Operations on {@link java.lang.String} that are
32
 * {@code null} safe.</p>
33
 *
34
 * <ul>
35
 *  <li><b>IsEmpty/IsBlank</b>
36
 *      - checks if a String contains text</li>
37
 *  <li><b>Trim/Strip</b>
38
 *      - removes leading and trailing whitespace</li>
39
 *  <li><b>Equals/Compare</b>
40
 *      - compares two strings null-safe</li>
41
 *  <li><b>startsWith</b>
42
 *      - check if a String starts with a prefix null-safe</li>
43
 *  <li><b>endsWith</b>
44
 *      - check if a String ends with a suffix null-safe</li>
45
 *  <li><b>IndexOf/LastIndexOf/Contains</b>
46
 *      - null-safe index-of checks
47
 *  <li><b>IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut</b>
48
 *      - index-of any of a set of Strings</li>
49
 *  <li><b>ContainsOnly/ContainsNone/ContainsAny</b>
50
 *      - does String contains only/none/any of these characters</li>
51
 *  <li><b>Substring/Left/Right/Mid</b>
52
 *      - null-safe substring extractions</li>
53
 *  <li><b>SubstringBefore/SubstringAfter/SubstringBetween</b>
54
 *      - substring extraction relative to other strings</li>
55
 *  <li><b>Split/Join</b>
56
 *      - splits a String into an array of substrings and vice versa</li>
57
 *  <li><b>Remove/Delete</b>
58
 *      - removes part of a String</li>
59
 *  <li><b>Replace/Overlay</b>
60
 *      - Searches a String and replaces one String with another</li>
61
 *  <li><b>Chomp/Chop</b>
62
 *      - removes the last part of a String</li>
63
 *  <li><b>AppendIfMissing</b>
64
 *      - appends a suffix to the end of the String if not present</li>
65
 *  <li><b>PrependIfMissing</b>
66
 *      - prepends a prefix to the start of the String if not present</li>
67
 *  <li><b>LeftPad/RightPad/Center/Repeat</b>
68
 *      - pads a String</li>
69
 *  <li><b>UpperCase/LowerCase/SwapCase/Capitalize/Uncapitalize</b>
70
 *      - changes the case of a String</li>
71
 *  <li><b>CountMatches</b>
72
 *      - counts the number of occurrences of one String in another</li>
73
 *  <li><b>IsAlpha/IsNumeric/IsWhitespace/IsAsciiPrintable</b>
74
 *      - checks the characters in a String</li>
75
 *  <li><b>DefaultString</b>
76
 *      - protects against a null input String</li>
77
 *  <li><b>Rotate</b>
78
 *      - rotate (circular shift) a String</li>
79
 *  <li><b>Reverse/ReverseDelimited</b>
80
 *      - reverses a String</li>
81
 *  <li><b>Abbreviate</b>
82
 *      - abbreviates a string using ellipsis or another given String</li>
83
 *  <li><b>Difference</b>
84
 *      - compares Strings and reports on their differences</li>
85
 *  <li><b>LevenshteinDistance</b>
86
 *      - the number of changes needed to change one String into another</li>
87
 * </ul>
88
 *
89
 * <p>The {@code StringUtils} class defines certain words related to
90
 * String handling.</p>
91
 *
92
 * <ul>
93
 *  <li>null - {@code null}</li>
94
 *  <li>empty - a zero-length string ({@code ""})</li>
95
 *  <li>space - the space character ({@code ' '}, char 32)</li>
96
 *  <li>whitespace - the characters defined by {@link Character#isWhitespace(char)}</li>
97
 *  <li>trim - the characters &lt;= 32 as in {@link String#trim()}</li>
98
 * </ul>
99
 *
100
 * <p>{@code StringUtils} handles {@code null} input Strings quietly.
101
 * That is to say that a {@code null} input will return {@code null}.
102
 * Where a {@code boolean} or {@code int} is being returned
103
 * details vary by method.</p>
104
 *
105
 * <p>A side effect of the {@code null} handling is that a
106
 * {@code NullPointerException} should be considered a bug in
107
 * {@code StringUtils}.</p>
108
 *
109
 * <p>Methods in this class give sample code to explain their operation.
110
 * The symbol {@code *} is used to indicate any input including {@code null}.</p>
111
 *
112
 * <p>#ThreadSafe#</p>
113
 * @see java.lang.String
114
 * @since 1.0
115
 */
116
//@Immutable
117
public class StringUtils {
118
119
    private static final int STRING_BUILDER_SIZE = 256;
120
121
    // Performance testing notes (JDK 1.4, Jul03, scolebourne)
122
    // Whitespace:
123
    // Character.isWhitespace() is faster than WHITESPACE.indexOf()
124
    // where WHITESPACE is a string of all whitespace characters
125
    //
126
    // Character access:
127
    // String.charAt(n) versus toCharArray(), then array[n]
128
    // String.charAt(n) is about 15% worse for a 10K string
129
    // They are about equal for a length 50 string
130
    // String.charAt(n) is about 4 times better for a length 3 string
131
    // String.charAt(n) is best bet overall
132
    //
133
    // Append:
134
    // String.concat about twice as fast as StringBuffer.append
135
    // (not sure who tested this)
136
137
    /**
138
     * A String for a space character.
139
     *
140
     * @since 3.2
141
     */
142
    public static final String SPACE = " ";
143
144
    /**
145
     * The empty String {@code ""}.
146
     * @since 2.0
147
     */
148
    public static final String EMPTY = "";
149
150
    /**
151
     * A String for linefeed LF ("\n").
152
     *
153
     * @see <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6">JLF: Escape Sequences
154
     *      for Character and String Literals</a>
155
     * @since 3.2
156
     */
157
    public static final String LF = "\n";
158
159
    /**
160
     * A String for carriage return CR ("\r").
161
     *
162
     * @see <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6">JLF: Escape Sequences
163
     *      for Character and String Literals</a>
164
     * @since 3.2
165
     */
166
    public static final String CR = "\r";
167
168
    /**
169
     * Represents a failed index search.
170
     * @since 2.1
171
     */
172
    public static final int INDEX_NOT_FOUND = -1;
173
174
    /**
175
     * <p>The maximum size to which the padding constant(s) can expand.</p>
176
     */
177
    private static final int PAD_LIMIT = 8192;
178
179
    // Abbreviating
180
    //-----------------------------------------------------------------------
181
    /**
182
     * <p>Abbreviates a String using ellipses. This will turn
183
     * "Now is the time for all good men" into "Now is the time for..."</p>
184
     *
185
     * <p>Specifically:</p>
186
     * <ul>
187
     *   <li>If the number of characters in {@code str} is less than or equal to
188
     *       {@code maxWidth}, return {@code str}.</li>
189
     *   <li>Else abbreviate it to {@code (substring(str, 0, max-3) + "...")}.</li>
190
     *   <li>If {@code maxWidth} is less than {@code 4}, throw an
191
     *       {@code IllegalArgumentException}.</li>
192
     *   <li>In no case will it return a String of length greater than
193
     *       {@code maxWidth}.</li>
194
     * </ul>
195
     *
196
     * <pre>
197
     * StringUtils.abbreviate(null, *)      = null
198
     * StringUtils.abbreviate("", 4)        = ""
199
     * StringUtils.abbreviate("abcdefg", 6) = "abc..."
200
     * StringUtils.abbreviate("abcdefg", 7) = "abcdefg"
201
     * StringUtils.abbreviate("abcdefg", 8) = "abcdefg"
202
     * StringUtils.abbreviate("abcdefg", 4) = "a..."
203
     * StringUtils.abbreviate("abcdefg", 3) = IllegalArgumentException
204
     * </pre>
205
     *
206
     * @param str  the String to check, may be null
207
     * @param maxWidth  maximum length of result String, must be at least 4
208
     * @return abbreviated String, {@code null} if null String input
209
     * @throws IllegalArgumentException if the width is too small
210
     * @since 2.0
211
     */
212
    public static String abbreviate(final String str, final int maxWidth) {
213
        final String defaultAbbrevMarker = "...";
214 1 1. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return abbreviate(str, defaultAbbrevMarker, 0, maxWidth);
215
    }
216
217
    /**
218
     * <p>Abbreviates a String using ellipses. This will turn
219
     * "Now is the time for all good men" into "...is the time for..."</p>
220
     *
221
     * <p>Works like {@code abbreviate(String, int)}, but allows you to specify
222
     * a "left edge" offset.  Note that this left edge is not necessarily going to
223
     * be the leftmost character in the result, or the first character following the
224
     * ellipses, but it will appear somewhere in the result.
225
     *
226
     * <p>In no case will it return a String of length greater than
227
     * {@code maxWidth}.</p>
228
     *
229
     * <pre>
230
     * StringUtils.abbreviate(null, *, *)                = null
231
     * StringUtils.abbreviate("", 0, 4)                  = ""
232
     * StringUtils.abbreviate("abcdefghijklmno", -1, 10) = "abcdefg..."
233
     * StringUtils.abbreviate("abcdefghijklmno", 0, 10)  = "abcdefg..."
234
     * StringUtils.abbreviate("abcdefghijklmno", 1, 10)  = "abcdefg..."
235
     * StringUtils.abbreviate("abcdefghijklmno", 4, 10)  = "abcdefg..."
236
     * StringUtils.abbreviate("abcdefghijklmno", 5, 10)  = "...fghi..."
237
     * StringUtils.abbreviate("abcdefghijklmno", 6, 10)  = "...ghij..."
238
     * StringUtils.abbreviate("abcdefghijklmno", 8, 10)  = "...ijklmno"
239
     * StringUtils.abbreviate("abcdefghijklmno", 10, 10) = "...ijklmno"
240
     * StringUtils.abbreviate("abcdefghijklmno", 12, 10) = "...ijklmno"
241
     * StringUtils.abbreviate("abcdefghij", 0, 3)        = IllegalArgumentException
242
     * StringUtils.abbreviate("abcdefghij", 5, 6)        = IllegalArgumentException
243
     * </pre>
244
     *
245
     * @param str  the String to check, may be null
246
     * @param offset  left edge of source String
247
     * @param maxWidth  maximum length of result String, must be at least 4
248
     * @return abbreviated String, {@code null} if null String input
249
     * @throws IllegalArgumentException if the width is too small
250
     * @since 2.0
251
     */
252
    public static String abbreviate(final String str, final int offset, final int maxWidth) {
253
        final String defaultAbbrevMarker = "...";
254 1 1. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return abbreviate(str, defaultAbbrevMarker, offset, maxWidth);
255
    }
256
257
    /**
258
     * <p>Abbreviates a String using another given String as replacement marker. This will turn
259
     * "Now is the time for all good men" into "Now is the time for..." if "..." was defined
260
     * as the replacement marker.</p>
261
     *
262
     * <p>Specifically:</p>
263
     * <ul>
264
     *   <li>If the number of characters in {@code str} is less than or equal to
265
     *       {@code maxWidth}, return {@code str}.</li>
266
     *   <li>Else abbreviate it to {@code (substring(str, 0, max-abbrevMarker.length) + abbrevMarker)}.</li>
267
     *   <li>If {@code maxWidth} is less than {@code abbrevMarker.length + 1}, throw an
268
     *       {@code IllegalArgumentException}.</li>
269
     *   <li>In no case will it return a String of length greater than
270
     *       {@code maxWidth}.</li>
271
     * </ul>
272
     *
273
     * <pre>
274
     * StringUtils.abbreviate(null, "...", *)      = null
275
     * StringUtils.abbreviate("abcdefg", null, *)  = "abcdefg"
276
     * StringUtils.abbreviate("", "...", 4)        = ""
277
     * StringUtils.abbreviate("abcdefg", ".", 5)   = "abcd."
278
     * StringUtils.abbreviate("abcdefg", ".", 7)   = "abcdefg"
279
     * StringUtils.abbreviate("abcdefg", ".", 8)   = "abcdefg"
280
     * StringUtils.abbreviate("abcdefg", "..", 4)  = "ab.."
281
     * StringUtils.abbreviate("abcdefg", "..", 3)  = "a.."
282
     * StringUtils.abbreviate("abcdefg", "..", 2)  = IllegalArgumentException
283
     * StringUtils.abbreviate("abcdefg", "...", 3) = IllegalArgumentException
284
     * </pre>
285
     *
286
     * @param str  the String to check, may be null
287
     * @param abbrevMarker  the String used as replacement marker
288
     * @param maxWidth  maximum length of result String, must be at least {@code abbrevMarker.length + 1}
289
     * @return abbreviated String, {@code null} if null String input
290
     * @throws IllegalArgumentException if the width is too small
291
     * @since 3.6
292
     */
293
    public static String abbreviate(final String str, final String abbrevMarker, final int maxWidth) {
294 1 1. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return abbreviate(str, abbrevMarker, 0, maxWidth);
295
    }
296
297
    /**
298
     * <p>Abbreviates a String using a given replacement marker. This will turn
299
     * "Now is the time for all good men" into "...is the time for..." if "..." was defined
300
     * as the replacement marker.</p>
301
     *
302
     * <p>Works like {@code abbreviate(String, String, int)}, but allows you to specify
303
     * a "left edge" offset.  Note that this left edge is not necessarily going to
304
     * be the leftmost character in the result, or the first character following the
305
     * replacement marker, but it will appear somewhere in the result.
306
     *
307
     * <p>In no case will it return a String of length greater than {@code maxWidth}.</p>
308
     *
309
     * <pre>
310
     * StringUtils.abbreviate(null, null, *, *)                 = null
311
     * StringUtils.abbreviate("abcdefghijklmno", null, *, *)    = "abcdefghijklmno"
312
     * StringUtils.abbreviate("", "...", 0, 4)                  = ""
313
     * StringUtils.abbreviate("abcdefghijklmno", "---", -1, 10) = "abcdefg---"
314
     * StringUtils.abbreviate("abcdefghijklmno", ",", 0, 10)    = "abcdefghi,"
315
     * StringUtils.abbreviate("abcdefghijklmno", ",", 1, 10)    = "abcdefghi,"
316
     * StringUtils.abbreviate("abcdefghijklmno", ",", 2, 10)    = "abcdefghi,"
317
     * StringUtils.abbreviate("abcdefghijklmno", "::", 4, 10)   = "::efghij::"
318
     * StringUtils.abbreviate("abcdefghijklmno", "...", 6, 10)  = "...ghij..."
319
     * StringUtils.abbreviate("abcdefghijklmno", "*", 9, 10)    = "*ghijklmno"
320
     * StringUtils.abbreviate("abcdefghijklmno", "'", 10, 10)   = "'ghijklmno"
321
     * StringUtils.abbreviate("abcdefghijklmno", "!", 12, 10)   = "!ghijklmno"
322
     * StringUtils.abbreviate("abcdefghij", "abra", 0, 4)       = IllegalArgumentException
323
     * StringUtils.abbreviate("abcdefghij", "...", 5, 6)        = IllegalArgumentException
324
     * </pre>
325
     *
326
     * @param str  the String to check, may be null
327
     * @param abbrevMarker  the String used as replacement marker
328
     * @param offset  left edge of source String
329
     * @param maxWidth  maximum length of result String, must be at least 4
330
     * @return abbreviated String, {@code null} if null String input
331
     * @throws IllegalArgumentException if the width is too small
332
     * @since 3.6
333
     */
334
    public static String abbreviate(final String str, final String abbrevMarker, int offset, final int maxWidth) {
335 2 1. abbreviate : negated conditional → KILLED
2. abbreviate : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(abbrevMarker)) {
336 1 1. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
337
        }
338
339
        final int abbrevMarkerLength = abbrevMarker.length();
340 1 1. abbreviate : Replaced integer addition with subtraction → KILLED
        final int minAbbrevWidth = abbrevMarkerLength + 1;
341 2 1. abbreviate : Replaced integer addition with subtraction → SURVIVED
2. abbreviate : Replaced integer addition with subtraction → SURVIVED
        final int minAbbrevWidthOffset = abbrevMarkerLength + abbrevMarkerLength + 1;
342
343 2 1. abbreviate : changed conditional boundary → KILLED
2. abbreviate : negated conditional → KILLED
        if (maxWidth < minAbbrevWidth) {
344
            throw new IllegalArgumentException(String.format("Minimum abbreviation width is %d", minAbbrevWidth));
345
        }
346 2 1. abbreviate : changed conditional boundary → KILLED
2. abbreviate : negated conditional → KILLED
        if (str.length() <= maxWidth) {
347 1 1. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
348
        }
349 2 1. abbreviate : changed conditional boundary → SURVIVED
2. abbreviate : negated conditional → KILLED
        if (offset > str.length()) {
350
            offset = str.length();
351
        }
352 4 1. abbreviate : changed conditional boundary → SURVIVED
2. abbreviate : Replaced integer subtraction with addition → SURVIVED
3. abbreviate : Replaced integer subtraction with addition → KILLED
4. abbreviate : negated conditional → KILLED
        if (str.length() - offset < maxWidth - abbrevMarkerLength) {
353 2 1. abbreviate : Replaced integer subtraction with addition → SURVIVED
2. abbreviate : Replaced integer subtraction with addition → KILLED
            offset = str.length() - (maxWidth - abbrevMarkerLength);
354
        }
355 3 1. abbreviate : changed conditional boundary → KILLED
2. abbreviate : Replaced integer addition with subtraction → KILLED
3. abbreviate : negated conditional → KILLED
        if (offset <= abbrevMarkerLength+1) {
356 2 1. abbreviate : Replaced integer subtraction with addition → KILLED
2. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(0, maxWidth - abbrevMarkerLength) + abbrevMarker;
357
        }
358 2 1. abbreviate : changed conditional boundary → SURVIVED
2. abbreviate : negated conditional → KILLED
        if (maxWidth < minAbbrevWidthOffset) {
359
            throw new IllegalArgumentException(String.format("Minimum abbreviation width with offset is %d", minAbbrevWidthOffset));
360
        }
361 4 1. abbreviate : changed conditional boundary → SURVIVED
2. abbreviate : Replaced integer addition with subtraction → SURVIVED
3. abbreviate : Replaced integer subtraction with addition → KILLED
4. abbreviate : negated conditional → KILLED
        if (offset + maxWidth - abbrevMarkerLength < str.length()) {
362 2 1. abbreviate : Replaced integer subtraction with addition → KILLED
2. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return abbrevMarker + abbreviate(str.substring(offset), abbrevMarker, maxWidth - abbrevMarkerLength);
363
        }
364 3 1. abbreviate : Replaced integer subtraction with addition → KILLED
2. abbreviate : Replaced integer subtraction with addition → KILLED
3. abbreviate : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return abbrevMarker + str.substring(str.length() - (maxWidth - abbrevMarkerLength));
365
    }
366
367
    /**
368
     * <p>Abbreviates a String to the length passed, replacing the middle characters with the supplied
369
     * replacement String.</p>
370
     *
371
     * <p>This abbreviation only occurs if the following criteria is met:</p>
372
     * <ul>
373
     * <li>Neither the String for abbreviation nor the replacement String are null or empty </li>
374
     * <li>The length to truncate to is less than the length of the supplied String</li>
375
     * <li>The length to truncate to is greater than 0</li>
376
     * <li>The abbreviated String will have enough room for the length supplied replacement String
377
     * and the first and last characters of the supplied String for abbreviation</li>
378
     * </ul>
379
     * <p>Otherwise, the returned String will be the same as the supplied String for abbreviation.
380
     * </p>
381
     *
382
     * <pre>
383
     * StringUtils.abbreviateMiddle(null, null, 0)      = null
384
     * StringUtils.abbreviateMiddle("abc", null, 0)      = "abc"
385
     * StringUtils.abbreviateMiddle("abc", ".", 0)      = "abc"
386
     * StringUtils.abbreviateMiddle("abc", ".", 3)      = "abc"
387
     * StringUtils.abbreviateMiddle("abcdef", ".", 4)     = "ab.f"
388
     * </pre>
389
     *
390
     * @param str  the String to abbreviate, may be null
391
     * @param middle the String to replace the middle characters with, may be null
392
     * @param length the length to abbreviate {@code str} to.
393
     * @return the abbreviated String if the above criteria is met, or the original String supplied for abbreviation.
394
     * @since 2.5
395
     */
396
    public static String abbreviateMiddle(final String str, final String middle, final int length) {
397 2 1. abbreviateMiddle : negated conditional → KILLED
2. abbreviateMiddle : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(middle)) {
398 1 1. abbreviateMiddle : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviateMiddle to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
399
        }
400
401 5 1. abbreviateMiddle : changed conditional boundary → KILLED
2. abbreviateMiddle : changed conditional boundary → KILLED
3. abbreviateMiddle : Replaced integer addition with subtraction → KILLED
4. abbreviateMiddle : negated conditional → KILLED
5. abbreviateMiddle : negated conditional → KILLED
        if (length >= str.length() || length < middle.length()+2) {
402 1 1. abbreviateMiddle : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviateMiddle to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
403
        }
404
405 1 1. abbreviateMiddle : Replaced integer subtraction with addition → KILLED
        final int targetSting = length-middle.length();
406 3 1. abbreviateMiddle : Replaced integer division with multiplication → KILLED
2. abbreviateMiddle : Replaced integer modulus with multiplication → KILLED
3. abbreviateMiddle : Replaced integer addition with subtraction → KILLED
        final int startOffset = targetSting/2+targetSting%2;
407 2 1. abbreviateMiddle : Replaced integer division with multiplication → KILLED
2. abbreviateMiddle : Replaced integer subtraction with addition → KILLED
        final int endOffset = str.length()-targetSting/2;
408
409 1 1. abbreviateMiddle : mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviateMiddle to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, startOffset) +
410
            middle +
411
            str.substring(endOffset);
412
    }
413
414
    /**
415
     * Appends the suffix to the end of the string if the string does not
416
     * already end with the suffix.
417
     *
418
     * @param str The string.
419
     * @param suffix The suffix to append to the end of the string.
420
     * @param ignoreCase Indicates whether the compare should ignore case.
421
     * @param suffixes Additional suffixes that are valid terminators (optional).
422
     *
423
     * @return A new String if suffix was appended, the same string otherwise.
424
     */
425
    private static String appendIfMissing(final String str, final CharSequence suffix, final boolean ignoreCase, final CharSequence... suffixes) {
426 3 1. appendIfMissing : negated conditional → KILLED
2. appendIfMissing : negated conditional → KILLED
3. appendIfMissing : negated conditional → KILLED
        if (str == null || isEmpty(suffix) || endsWith(str, suffix, ignoreCase)) {
427 1 1. appendIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
428
        }
429 3 1. appendIfMissing : changed conditional boundary → SURVIVED
2. appendIfMissing : negated conditional → KILLED
3. appendIfMissing : negated conditional → KILLED
        if (suffixes != null && suffixes.length > 0) {
430
            for (final CharSequence s : suffixes) {
431 1 1. appendIfMissing : negated conditional → KILLED
                if (endsWith(str, s, ignoreCase)) {
432 1 1. appendIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
                    return str;
433
                }
434
            }
435
        }
436 1 1. appendIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str + suffix.toString();
437
    }
438
439
    /**
440
     * Appends the suffix to the end of the string if the string does not
441
     * already end with any of the suffixes.
442
     *
443
     * <pre>
444
     * StringUtils.appendIfMissing(null, null) = null
445
     * StringUtils.appendIfMissing("abc", null) = "abc"
446
     * StringUtils.appendIfMissing("", "xyz") = "xyz"
447
     * StringUtils.appendIfMissing("abc", "xyz") = "abcxyz"
448
     * StringUtils.appendIfMissing("abcxyz", "xyz") = "abcxyz"
449
     * StringUtils.appendIfMissing("abcXYZ", "xyz") = "abcXYZxyz"
450
     * </pre>
451
     * <p>With additional suffixes,</p>
452
     * <pre>
453
     * StringUtils.appendIfMissing(null, null, null) = null
454
     * StringUtils.appendIfMissing("abc", null, null) = "abc"
455
     * StringUtils.appendIfMissing("", "xyz", null) = "xyz"
456
     * StringUtils.appendIfMissing("abc", "xyz", new CharSequence[]{null}) = "abcxyz"
457
     * StringUtils.appendIfMissing("abc", "xyz", "") = "abc"
458
     * StringUtils.appendIfMissing("abc", "xyz", "mno") = "abcxyz"
459
     * StringUtils.appendIfMissing("abcxyz", "xyz", "mno") = "abcxyz"
460
     * StringUtils.appendIfMissing("abcmno", "xyz", "mno") = "abcmno"
461
     * StringUtils.appendIfMissing("abcXYZ", "xyz", "mno") = "abcXYZxyz"
462
     * StringUtils.appendIfMissing("abcMNO", "xyz", "mno") = "abcMNOxyz"
463
     * </pre>
464
     *
465
     * @param str The string.
466
     * @param suffix The suffix to append to the end of the string.
467
     * @param suffixes Additional suffixes that are valid terminators.
468
     *
469
     * @return A new String if suffix was appended, the same string otherwise.
470
     *
471
     * @since 3.2
472
     */
473
    public static String appendIfMissing(final String str, final CharSequence suffix, final CharSequence... suffixes) {
474 1 1. appendIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return appendIfMissing(str, suffix, false, suffixes);
475
    }
476
477
    /**
478
     * Appends the suffix to the end of the string if the string does not
479
     * already end, case insensitive, with any of the suffixes.
480
     *
481
     * <pre>
482
     * StringUtils.appendIfMissingIgnoreCase(null, null) = null
483
     * StringUtils.appendIfMissingIgnoreCase("abc", null) = "abc"
484
     * StringUtils.appendIfMissingIgnoreCase("", "xyz") = "xyz"
485
     * StringUtils.appendIfMissingIgnoreCase("abc", "xyz") = "abcxyz"
486
     * StringUtils.appendIfMissingIgnoreCase("abcxyz", "xyz") = "abcxyz"
487
     * StringUtils.appendIfMissingIgnoreCase("abcXYZ", "xyz") = "abcXYZ"
488
     * </pre>
489
     * <p>With additional suffixes,</p>
490
     * <pre>
491
     * StringUtils.appendIfMissingIgnoreCase(null, null, null) = null
492
     * StringUtils.appendIfMissingIgnoreCase("abc", null, null) = "abc"
493
     * StringUtils.appendIfMissingIgnoreCase("", "xyz", null) = "xyz"
494
     * StringUtils.appendIfMissingIgnoreCase("abc", "xyz", new CharSequence[]{null}) = "abcxyz"
495
     * StringUtils.appendIfMissingIgnoreCase("abc", "xyz", "") = "abc"
496
     * StringUtils.appendIfMissingIgnoreCase("abc", "xyz", "mno") = "axyz"
497
     * StringUtils.appendIfMissingIgnoreCase("abcxyz", "xyz", "mno") = "abcxyz"
498
     * StringUtils.appendIfMissingIgnoreCase("abcmno", "xyz", "mno") = "abcmno"
499
     * StringUtils.appendIfMissingIgnoreCase("abcXYZ", "xyz", "mno") = "abcXYZ"
500
     * StringUtils.appendIfMissingIgnoreCase("abcMNO", "xyz", "mno") = "abcMNO"
501
     * </pre>
502
     *
503
     * @param str The string.
504
     * @param suffix The suffix to append to the end of the string.
505
     * @param suffixes Additional suffixes that are valid terminators.
506
     *
507
     * @return A new String if suffix was appended, the same string otherwise.
508
     *
509
     * @since 3.2
510
     */
511
    public static String appendIfMissingIgnoreCase(final String str, final CharSequence suffix, final CharSequence... suffixes) {
512 1 1. appendIfMissingIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissingIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return appendIfMissing(str, suffix, true, suffixes);
513
    }
514
515
    /**
516
     * <p>Capitalizes a String changing the first character to title case as
517
     * per {@link Character#toTitleCase(int)}. No other characters are changed.</p>
518
     *
519
     * <p>For a word based algorithm, see {@link org.apache.commons.lang3.text.WordUtils#capitalize(String)}.
520
     * A {@code null} input String returns {@code null}.</p>
521
     *
522
     * <pre>
523
     * StringUtils.capitalize(null)  = null
524
     * StringUtils.capitalize("")    = ""
525
     * StringUtils.capitalize("cat") = "Cat"
526
     * StringUtils.capitalize("cAt") = "CAt"
527
     * StringUtils.capitalize("'cat'") = "'cat'"
528
     * </pre>
529
     *
530
     * @param str the String to capitalize, may be null
531
     * @return the capitalized String, {@code null} if null String input
532
     * @see org.apache.commons.lang3.text.WordUtils#capitalize(String)
533
     * @see #uncapitalize(String)
534
     * @since 2.0
535
     */
536
    public static String capitalize(final String str) {
537
        int strLen;
538 2 1. capitalize : negated conditional → KILLED
2. capitalize : negated conditional → KILLED
        if (str == null || (strLen = str.length()) == 0) {
539 1 1. capitalize : mutated return of Object value for org/apache/commons/lang3/StringUtils::capitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
540
        }
541
542
        final int firstCodepoint = str.codePointAt(0);
543
        final int newCodePoint = Character.toTitleCase(firstCodepoint);
544 1 1. capitalize : negated conditional → KILLED
        if (firstCodepoint == newCodePoint) {
545
            // already capitalized
546 1 1. capitalize : mutated return of Object value for org/apache/commons/lang3/StringUtils::capitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
547
        }
548
549
        final int newCodePoints[] = new int[strLen]; // cannot be longer than the char array
550
        int outOffset = 0;
551 1 1. capitalize : Changed increment from 1 to -1 → KILLED
        newCodePoints[outOffset++] = newCodePoint; // copy the first codepoint
552 2 1. capitalize : changed conditional boundary → KILLED
2. capitalize : negated conditional → KILLED
        for (int inOffset = Character.charCount(firstCodepoint); inOffset < strLen; ) {
553
            final int codepoint = str.codePointAt(inOffset);
554 1 1. capitalize : Changed increment from 1 to -1 → KILLED
            newCodePoints[outOffset++] = codepoint; // copy the remaining ones
555 1 1. capitalize : Replaced integer addition with subtraction → KILLED
            inOffset += Character.charCount(codepoint);
556
         }
557 1 1. capitalize : mutated return of Object value for org/apache/commons/lang3/StringUtils::capitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(newCodePoints, 0, outOffset);
558
    }
559
560
    // Centering
561
    //-----------------------------------------------------------------------
562
    /**
563
     * <p>Centers a String in a larger String of size {@code size}
564
     * using the space character (' ').</p>
565
     *
566
     * <p>If the size is less than the String length, the String is returned.
567
     * A {@code null} String returns {@code null}.
568
     * A negative size is treated as zero.</p>
569
     *
570
     * <p>Equivalent to {@code center(str, size, " ")}.</p>
571
     *
572
     * <pre>
573
     * StringUtils.center(null, *)   = null
574
     * StringUtils.center("", 4)     = "    "
575
     * StringUtils.center("ab", -1)  = "ab"
576
     * StringUtils.center("ab", 4)   = " ab "
577
     * StringUtils.center("abcd", 2) = "abcd"
578
     * StringUtils.center("a", 4)    = " a  "
579
     * </pre>
580
     *
581
     * @param str  the String to center, may be null
582
     * @param size  the int size of new String, negative treated as zero
583
     * @return centered String, {@code null} if null String input
584
     */
585
    public static String center(final String str, final int size) {
586 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return center(str, size, ' ');
587
    }
588
589
    /**
590
     * <p>Centers a String in a larger String of size {@code size}.
591
     * Uses a supplied character as the value to pad the String with.</p>
592
     *
593
     * <p>If the size is less than the String length, the String is returned.
594
     * A {@code null} String returns {@code null}.
595
     * A negative size is treated as zero.</p>
596
     *
597
     * <pre>
598
     * StringUtils.center(null, *, *)     = null
599
     * StringUtils.center("", 4, ' ')     = "    "
600
     * StringUtils.center("ab", -1, ' ')  = "ab"
601
     * StringUtils.center("ab", 4, ' ')   = " ab "
602
     * StringUtils.center("abcd", 2, ' ') = "abcd"
603
     * StringUtils.center("a", 4, ' ')    = " a  "
604
     * StringUtils.center("a", 4, 'y')    = "yayy"
605
     * </pre>
606
     *
607
     * @param str  the String to center, may be null
608
     * @param size  the int size of new String, negative treated as zero
609
     * @param padChar  the character to pad the new String with
610
     * @return centered String, {@code null} if null String input
611
     * @since 2.0
612
     */
613
    public static String center(String str, final int size, final char padChar) {
614 3 1. center : changed conditional boundary → SURVIVED
2. center : negated conditional → KILLED
3. center : negated conditional → KILLED
        if (str == null || size <= 0) {
615 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
616
        }
617
        final int strLen = str.length();
618 1 1. center : Replaced integer subtraction with addition → KILLED
        final int pads = size - strLen;
619 2 1. center : changed conditional boundary → SURVIVED
2. center : negated conditional → KILLED
        if (pads <= 0) {
620 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
621
        }
622 2 1. center : Replaced integer division with multiplication → KILLED
2. center : Replaced integer addition with subtraction → KILLED
        str = leftPad(str, strLen + pads / 2, padChar);
623
        str = rightPad(str, size, padChar);
624 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
625
    }
626
627
    /**
628
     * <p>Centers a String in a larger String of size {@code size}.
629
     * Uses a supplied String as the value to pad the String with.</p>
630
     *
631
     * <p>If the size is less than the String length, the String is returned.
632
     * A {@code null} String returns {@code null}.
633
     * A negative size is treated as zero.</p>
634
     *
635
     * <pre>
636
     * StringUtils.center(null, *, *)     = null
637
     * StringUtils.center("", 4, " ")     = "    "
638
     * StringUtils.center("ab", -1, " ")  = "ab"
639
     * StringUtils.center("ab", 4, " ")   = " ab "
640
     * StringUtils.center("abcd", 2, " ") = "abcd"
641
     * StringUtils.center("a", 4, " ")    = " a  "
642
     * StringUtils.center("a", 4, "yz")   = "yayz"
643
     * StringUtils.center("abc", 7, null) = "  abc  "
644
     * StringUtils.center("abc", 7, "")   = "  abc  "
645
     * </pre>
646
     *
647
     * @param str  the String to center, may be null
648
     * @param size  the int size of new String, negative treated as zero
649
     * @param padStr  the String to pad the new String with, must not be null or empty
650
     * @return centered String, {@code null} if null String input
651
     * @throws IllegalArgumentException if padStr is {@code null} or empty
652
     */
653
    public static String center(String str, final int size, String padStr) {
654 3 1. center : changed conditional boundary → SURVIVED
2. center : negated conditional → KILLED
3. center : negated conditional → KILLED
        if (str == null || size <= 0) {
655 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
656
        }
657 1 1. center : negated conditional → KILLED
        if (isEmpty(padStr)) {
658
            padStr = SPACE;
659
        }
660
        final int strLen = str.length();
661 1 1. center : Replaced integer subtraction with addition → KILLED
        final int pads = size - strLen;
662 2 1. center : changed conditional boundary → SURVIVED
2. center : negated conditional → KILLED
        if (pads <= 0) {
663 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
664
        }
665 2 1. center : Replaced integer division with multiplication → KILLED
2. center : Replaced integer addition with subtraction → KILLED
        str = leftPad(str, strLen + pads / 2, padStr);
666
        str = rightPad(str, size, padStr);
667 1 1. center : mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
668
    }
669
670
    // Chomping
671
    //-----------------------------------------------------------------------
672
    /**
673
     * <p>Removes one newline from end of a String if it's there,
674
     * otherwise leave it alone.  A newline is &quot;{@code \n}&quot;,
675
     * &quot;{@code \r}&quot;, or &quot;{@code \r\n}&quot;.</p>
676
     *
677
     * <p>NOTE: This method changed in 2.0.
678
     * It now more closely matches Perl chomp.</p>
679
     *
680
     * <pre>
681
     * StringUtils.chomp(null)          = null
682
     * StringUtils.chomp("")            = ""
683
     * StringUtils.chomp("abc \r")      = "abc "
684
     * StringUtils.chomp("abc\n")       = "abc"
685
     * StringUtils.chomp("abc\r\n")     = "abc"
686
     * StringUtils.chomp("abc\r\n\r\n") = "abc\r\n"
687
     * StringUtils.chomp("abc\n\r")     = "abc\n"
688
     * StringUtils.chomp("abc\n\rabc")  = "abc\n\rabc"
689
     * StringUtils.chomp("\r")          = ""
690
     * StringUtils.chomp("\n")          = ""
691
     * StringUtils.chomp("\r\n")        = ""
692
     * </pre>
693
     *
694
     * @param str  the String to chomp a newline from, may be null
695
     * @return String without newline, {@code null} if null String input
696
     */
697
    public static String chomp(final String str) {
698 1 1. chomp : negated conditional → KILLED
        if (isEmpty(str)) {
699 1 1. chomp : mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
700
        }
701
702 1 1. chomp : negated conditional → KILLED
        if (str.length() == 1) {
703
            final char ch = str.charAt(0);
704 2 1. chomp : negated conditional → KILLED
2. chomp : negated conditional → KILLED
            if (ch == CharUtils.CR || ch == CharUtils.LF) {
705 1 1. chomp : mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return EMPTY;
706
            }
707 1 1. chomp : mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
708
        }
709
710 1 1. chomp : Replaced integer subtraction with addition → KILLED
        int lastIdx = str.length() - 1;
711
        final char last = str.charAt(lastIdx);
712
713 1 1. chomp : negated conditional → KILLED
        if (last == CharUtils.LF) {
714 2 1. chomp : Replaced integer subtraction with addition → KILLED
2. chomp : negated conditional → KILLED
            if (str.charAt(lastIdx - 1) == CharUtils.CR) {
715 1 1. chomp : Changed increment from -1 to 1 → KILLED
                lastIdx--;
716
            }
717 1 1. chomp : negated conditional → KILLED
        } else if (last != CharUtils.CR) {
718 1 1. chomp : Changed increment from 1 to -1 → KILLED
            lastIdx++;
719
        }
720 1 1. chomp : mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, lastIdx);
721
    }
722
723
    /**
724
     * <p>Removes {@code separator} from the end of
725
     * {@code str} if it's there, otherwise leave it alone.</p>
726
     *
727
     * <p>NOTE: This method changed in version 2.0.
728
     * It now more closely matches Perl chomp.
729
     * For the previous behavior, use {@link #substringBeforeLast(String, String)}.
730
     * This method uses {@link String#endsWith(String)}.</p>
731
     *
732
     * <pre>
733
     * StringUtils.chomp(null, *)         = null
734
     * StringUtils.chomp("", *)           = ""
735
     * StringUtils.chomp("foobar", "bar") = "foo"
736
     * StringUtils.chomp("foobar", "baz") = "foobar"
737
     * StringUtils.chomp("foo", "foo")    = ""
738
     * StringUtils.chomp("foo ", "foo")   = "foo "
739
     * StringUtils.chomp(" foo", "foo")   = " "
740
     * StringUtils.chomp("foo", "foooo")  = "foo"
741
     * StringUtils.chomp("foo", "")       = "foo"
742
     * StringUtils.chomp("foo", null)     = "foo"
743
     * </pre>
744
     *
745
     * @param str  the String to chomp from, may be null
746
     * @param separator  separator String, may be null
747
     * @return String without trailing separator, {@code null} if null String input
748
     * @deprecated This feature will be removed in Lang 4.0, use {@link StringUtils#removeEnd(String, String)} instead
749
     */
750
    @Deprecated
751
    public static String chomp(final String str, final String separator) {
752 1 1. chomp : mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return removeEnd(str, separator);
753
    }
754
755
    // Chopping
756
    //-----------------------------------------------------------------------
757
    /**
758
     * <p>Remove the last character from a String.</p>
759
     *
760
     * <p>If the String ends in {@code \r\n}, then remove both
761
     * of them.</p>
762
     *
763
     * <pre>
764
     * StringUtils.chop(null)          = null
765
     * StringUtils.chop("")            = ""
766
     * StringUtils.chop("abc \r")      = "abc "
767
     * StringUtils.chop("abc\n")       = "abc"
768
     * StringUtils.chop("abc\r\n")     = "abc"
769
     * StringUtils.chop("abc")         = "ab"
770
     * StringUtils.chop("abc\nabc")    = "abc\nab"
771
     * StringUtils.chop("a")           = ""
772
     * StringUtils.chop("\r")          = ""
773
     * StringUtils.chop("\n")          = ""
774
     * StringUtils.chop("\r\n")        = ""
775
     * </pre>
776
     *
777
     * @param str  the String to chop last character from, may be null
778
     * @return String without last character, {@code null} if null String input
779
     */
780
    public static String chop(final String str) {
781 1 1. chop : negated conditional → KILLED
        if (str == null) {
782 1 1. chop : mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
783
        }
784
        final int strLen = str.length();
785 2 1. chop : changed conditional boundary → SURVIVED
2. chop : negated conditional → KILLED
        if (strLen < 2) {
786 1 1. chop : mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
787
        }
788 1 1. chop : Replaced integer subtraction with addition → KILLED
        final int lastIdx = strLen - 1;
789
        final String ret = str.substring(0, lastIdx);
790
        final char last = str.charAt(lastIdx);
791 3 1. chop : Replaced integer subtraction with addition → KILLED
2. chop : negated conditional → KILLED
3. chop : negated conditional → KILLED
        if (last == CharUtils.LF && ret.charAt(lastIdx - 1) == CharUtils.CR) {
792 2 1. chop : Replaced integer subtraction with addition → KILLED
2. chop : mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ret.substring(0, lastIdx - 1);
793
        }
794 1 1. chop : mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return ret;
795
    }
796
797
    // Compare
798
    //-----------------------------------------------------------------------
799
    /**
800
     * <p>Compare two Strings lexicographically, as per {@link String#compareTo(String)}, returning :</p>
801
     * <ul>
802
     *  <li>{@code int = 0}, if {@code str1} is equal to {@code str2} (or both {@code null})</li>
803
     *  <li>{@code int < 0}, if {@code str1} is less than {@code str2}</li>
804
     *  <li>{@code int > 0}, if {@code str1} is greater than {@code str2}</li>
805
     * </ul>
806
     *
807
     * <p>This is a {@code null} safe version of :</p>
808
     * <blockquote><pre>str1.compareTo(str2)</pre></blockquote>
809
     *
810
     * <p>{@code null} value is considered less than non-{@code null} value.
811
     * Two {@code null} references are considered equal.</p>
812
     *
813
     * <pre>
814
     * StringUtils.compare(null, null)   = 0
815
     * StringUtils.compare(null , "a")   &lt; 0
816
     * StringUtils.compare("a", null)    &gt; 0
817
     * StringUtils.compare("abc", "abc") = 0
818
     * StringUtils.compare("a", "b")     &lt; 0
819
     * StringUtils.compare("b", "a")     &gt; 0
820
     * StringUtils.compare("a", "B")     &gt; 0
821
     * StringUtils.compare("ab", "abc")  &lt; 0
822
     * </pre>
823
     *
824
     * @see #compare(String, String, boolean)
825
     * @see String#compareTo(String)
826
     * @param str1  the String to compare from
827
     * @param str2  the String to compare to
828
     * @return &lt; 0, 0, &gt; 0, if {@code str1} is respectively less, equal or greater than {@code str2}
829
     * @since 3.5
830
     */
831
    public static int compare(final String str1, final String str2) {
832 1 1. compare : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return compare(str1, str2, true);
833
    }
834
835
    /**
836
     * <p>Compare two Strings lexicographically, as per {@link String#compareTo(String)}, returning :</p>
837
     * <ul>
838
     *  <li>{@code int = 0}, if {@code str1} is equal to {@code str2} (or both {@code null})</li>
839
     *  <li>{@code int < 0}, if {@code str1} is less than {@code str2}</li>
840
     *  <li>{@code int > 0}, if {@code str1} is greater than {@code str2}</li>
841
     * </ul>
842
     *
843
     * <p>This is a {@code null} safe version of :</p>
844
     * <blockquote><pre>str1.compareTo(str2)</pre></blockquote>
845
     *
846
     * <p>{@code null} inputs are handled according to the {@code nullIsLess} parameter.
847
     * Two {@code null} references are considered equal.</p>
848
     *
849
     * <pre>
850
     * StringUtils.compare(null, null, *)     = 0
851
     * StringUtils.compare(null , "a", true)  &lt; 0
852
     * StringUtils.compare(null , "a", false) &gt; 0
853
     * StringUtils.compare("a", null, true)   &gt; 0
854
     * StringUtils.compare("a", null, false)  &lt; 0
855
     * StringUtils.compare("abc", "abc", *)   = 0
856
     * StringUtils.compare("a", "b", *)       &lt; 0
857
     * StringUtils.compare("b", "a", *)       &gt; 0
858
     * StringUtils.compare("a", "B", *)       &gt; 0
859
     * StringUtils.compare("ab", "abc", *)    &lt; 0
860
     * </pre>
861
     *
862
     * @see String#compareTo(String)
863
     * @param str1  the String to compare from
864
     * @param str2  the String to compare to
865
     * @param nullIsLess  whether consider {@code null} value less than non-{@code null} value
866
     * @return &lt; 0, 0, &gt; 0, if {@code str1} is respectively less, equal ou greater than {@code str2}
867
     * @since 3.5
868
     */
869
    public static int compare(final String str1, final String str2, final boolean nullIsLess) {
870 1 1. compare : negated conditional → KILLED
        if (str1 == str2) {
871 1 1. compare : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return 0;
872
        }
873 1 1. compare : negated conditional → KILLED
        if (str1 == null) {
874 2 1. compare : negated conditional → KILLED
2. compare : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return nullIsLess ? -1 : 1;
875
        }
876 1 1. compare : negated conditional → KILLED
        if (str2 == null) {
877 2 1. compare : negated conditional → KILLED
2. compare : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return nullIsLess ? 1 : - 1;
878
        }
879 1 1. compare : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return str1.compareTo(str2);
880
    }
881
882
    /**
883
     * <p>Compare two Strings lexicographically, ignoring case differences,
884
     * as per {@link String#compareToIgnoreCase(String)}, returning :</p>
885
     * <ul>
886
     *  <li>{@code int = 0}, if {@code str1} is equal to {@code str2} (or both {@code null})</li>
887
     *  <li>{@code int < 0}, if {@code str1} is less than {@code str2}</li>
888
     *  <li>{@code int > 0}, if {@code str1} is greater than {@code str2}</li>
889
     * </ul>
890
     *
891
     * <p>This is a {@code null} safe version of :</p>
892
     * <blockquote><pre>str1.compareToIgnoreCase(str2)</pre></blockquote>
893
     *
894
     * <p>{@code null} value is considered less than non-{@code null} value.
895
     * Two {@code null} references are considered equal.
896
     * Comparison is case insensitive.</p>
897
     *
898
     * <pre>
899
     * StringUtils.compareIgnoreCase(null, null)   = 0
900
     * StringUtils.compareIgnoreCase(null , "a")   &lt; 0
901
     * StringUtils.compareIgnoreCase("a", null)    &gt; 0
902
     * StringUtils.compareIgnoreCase("abc", "abc") = 0
903
     * StringUtils.compareIgnoreCase("abc", "ABC") = 0
904
     * StringUtils.compareIgnoreCase("a", "b")     &lt; 0
905
     * StringUtils.compareIgnoreCase("b", "a")     &gt; 0
906
     * StringUtils.compareIgnoreCase("a", "B")     &lt; 0
907
     * StringUtils.compareIgnoreCase("A", "b")     &lt; 0
908
     * StringUtils.compareIgnoreCase("ab", "ABC")  &lt; 0
909
     * </pre>
910
     *
911
     * @see #compareIgnoreCase(String, String, boolean)
912
     * @see String#compareToIgnoreCase(String)
913
     * @param str1  the String to compare from
914
     * @param str2  the String to compare to
915
     * @return &lt; 0, 0, &gt; 0, if {@code str1} is respectively less, equal ou greater than {@code str2},
916
     *          ignoring case differences.
917
     * @since 3.5
918
     */
919
    public static int compareIgnoreCase(final String str1, final String str2) {
920 1 1. compareIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return compareIgnoreCase(str1, str2, true);
921
    }
922
923
    /**
924
     * <p>Compare two Strings lexicographically, ignoring case differences,
925
     * as per {@link String#compareToIgnoreCase(String)}, returning :</p>
926
     * <ul>
927
     *  <li>{@code int = 0}, if {@code str1} is equal to {@code str2} (or both {@code null})</li>
928
     *  <li>{@code int < 0}, if {@code str1} is less than {@code str2}</li>
929
     *  <li>{@code int > 0}, if {@code str1} is greater than {@code str2}</li>
930
     * </ul>
931
     *
932
     * <p>This is a {@code null} safe version of :</p>
933
     * <blockquote><pre>str1.compareToIgnoreCase(str2)</pre></blockquote>
934
     *
935
     * <p>{@code null} inputs are handled according to the {@code nullIsLess} parameter.
936
     * Two {@code null} references are considered equal.
937
     * Comparison is case insensitive.</p>
938
     *
939
     * <pre>
940
     * StringUtils.compareIgnoreCase(null, null, *)     = 0
941
     * StringUtils.compareIgnoreCase(null , "a", true)  &lt; 0
942
     * StringUtils.compareIgnoreCase(null , "a", false) &gt; 0
943
     * StringUtils.compareIgnoreCase("a", null, true)   &gt; 0
944
     * StringUtils.compareIgnoreCase("a", null, false)  &lt; 0
945
     * StringUtils.compareIgnoreCase("abc", "abc", *)   = 0
946
     * StringUtils.compareIgnoreCase("abc", "ABC", *)   = 0
947
     * StringUtils.compareIgnoreCase("a", "b", *)       &lt; 0
948
     * StringUtils.compareIgnoreCase("b", "a", *)       &gt; 0
949
     * StringUtils.compareIgnoreCase("a", "B", *)       &lt; 0
950
     * StringUtils.compareIgnoreCase("A", "b", *)       &lt; 0
951
     * StringUtils.compareIgnoreCase("ab", "abc", *)    &lt; 0
952
     * </pre>
953
     *
954
     * @see String#compareToIgnoreCase(String)
955
     * @param str1  the String to compare from
956
     * @param str2  the String to compare to
957
     * @param nullIsLess  whether consider {@code null} value less than non-{@code null} value
958
     * @return &lt; 0, 0, &gt; 0, if {@code str1} is respectively less, equal ou greater than {@code str2},
959
     *          ignoring case differences.
960
     * @since 3.5
961
     */
962
    public static int compareIgnoreCase(final String str1, final String str2, final boolean nullIsLess) {
963 1 1. compareIgnoreCase : negated conditional → KILLED
        if (str1 == str2) {
964 1 1. compareIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return 0;
965
        }
966 1 1. compareIgnoreCase : negated conditional → KILLED
        if (str1 == null) {
967 2 1. compareIgnoreCase : negated conditional → KILLED
2. compareIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return nullIsLess ? -1 : 1;
968
        }
969 1 1. compareIgnoreCase : negated conditional → KILLED
        if (str2 == null) {
970 2 1. compareIgnoreCase : negated conditional → KILLED
2. compareIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return nullIsLess ? 1 : - 1;
971
        }
972 1 1. compareIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return str1.compareToIgnoreCase(str2);
973
    }
974
975
    /**
976
     * <p>Checks if CharSequence contains a search CharSequence, handling {@code null}.
977
     * This method uses {@link String#indexOf(String)} if possible.</p>
978
     *
979
     * <p>A {@code null} CharSequence will return {@code false}.</p>
980
     *
981
     * <pre>
982
     * StringUtils.contains(null, *)     = false
983
     * StringUtils.contains(*, null)     = false
984
     * StringUtils.contains("", "")      = true
985
     * StringUtils.contains("abc", "")   = true
986
     * StringUtils.contains("abc", "a")  = true
987
     * StringUtils.contains("abc", "z")  = false
988
     * </pre>
989
     *
990
     * @param seq  the CharSequence to check, may be null
991
     * @param searchSeq  the CharSequence to find, may be null
992
     * @return true if the CharSequence contains the search CharSequence,
993
     *  false if not or {@code null} string input
994
     * @since 2.0
995
     * @since 3.0 Changed signature from contains(String, String) to contains(CharSequence, CharSequence)
996
     */
997
    public static boolean contains(final CharSequence seq, final CharSequence searchSeq) {
998 2 1. contains : negated conditional → KILLED
2. contains : negated conditional → KILLED
        if (seq == null || searchSeq == null) {
999 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1000
        }
1001 3 1. contains : changed conditional boundary → KILLED
2. contains : negated conditional → KILLED
3. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.indexOf(seq, searchSeq, 0) >= 0;
1002
    }
1003
1004
    // Contains
1005
    //-----------------------------------------------------------------------
1006
    /**
1007
     * <p>Checks if CharSequence contains a search character, handling {@code null}.
1008
     * This method uses {@link String#indexOf(int)} if possible.</p>
1009
     *
1010
     * <p>A {@code null} or empty ("") CharSequence will return {@code false}.</p>
1011
     *
1012
     * <pre>
1013
     * StringUtils.contains(null, *)    = false
1014
     * StringUtils.contains("", *)      = false
1015
     * StringUtils.contains("abc", 'a') = true
1016
     * StringUtils.contains("abc", 'z') = false
1017
     * </pre>
1018
     *
1019
     * @param seq  the CharSequence to check, may be null
1020
     * @param searchChar  the character to find
1021
     * @return true if the CharSequence contains the search character,
1022
     *  false if not or {@code null} string input
1023
     * @since 2.0
1024
     * @since 3.0 Changed signature from contains(String, int) to contains(CharSequence, int)
1025
     */
1026
    public static boolean contains(final CharSequence seq, final int searchChar) {
1027 1 1. contains : negated conditional → KILLED
        if (isEmpty(seq)) {
1028 1 1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1029
        }
1030 3 1. contains : changed conditional boundary → KILLED
2. contains : negated conditional → KILLED
3. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.indexOf(seq, searchChar, 0) >= 0;
1031
    }
1032
1033
    // ContainsAny
1034
    //-----------------------------------------------------------------------
1035
    /**
1036
     * <p>Checks if the CharSequence contains any character in the given
1037
     * set of characters.</p>
1038
     *
1039
     * <p>A {@code null} CharSequence will return {@code false}.
1040
     * A {@code null} or zero length search array will return {@code false}.</p>
1041
     *
1042
     * <pre>
1043
     * StringUtils.containsAny(null, *)                  = false
1044
     * StringUtils.containsAny("", *)                    = false
1045
     * StringUtils.containsAny(*, null)                  = false
1046
     * StringUtils.containsAny(*, [])                    = false
1047
     * StringUtils.containsAny("zzabyycdxx", ['z', 'a']) = true
1048
     * StringUtils.containsAny("zzabyycdxx", ['b', 'y']) = true
1049
     * StringUtils.containsAny("zzabyycdxx", ['z', 'y']) = true
1050
     * StringUtils.containsAny("aba", ['z'])             = false
1051
     * </pre>
1052
     *
1053
     * @param cs  the CharSequence to check, may be null
1054
     * @param searchChars  the chars to search for, may be null
1055
     * @return the {@code true} if any of the chars are found,
1056
     * {@code false} if no match or null input
1057
     * @since 2.4
1058
     * @since 3.0 Changed signature from containsAny(String, char[]) to containsAny(CharSequence, char...)
1059
     */
1060
    public static boolean containsAny(final CharSequence cs, final char... searchChars) {
1061 2 1. containsAny : negated conditional → KILLED
2. containsAny : negated conditional → KILLED
        if (isEmpty(cs) || ArrayUtils.isEmpty(searchChars)) {
1062 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1063
        }
1064
        final int csLength = cs.length();
1065
        final int searchLength = searchChars.length;
1066 1 1. containsAny : Replaced integer subtraction with addition → KILLED
        final int csLast = csLength - 1;
1067 1 1. containsAny : Replaced integer subtraction with addition → KILLED
        final int searchLast = searchLength - 1;
1068 3 1. containsAny : changed conditional boundary → KILLED
2. containsAny : Changed increment from 1 to -1 → KILLED
3. containsAny : negated conditional → KILLED
        for (int i = 0; i < csLength; i++) {
1069
            final char ch = cs.charAt(i);
1070 3 1. containsAny : changed conditional boundary → KILLED
2. containsAny : Changed increment from 1 to -1 → KILLED
3. containsAny : negated conditional → KILLED
            for (int j = 0; j < searchLength; j++) {
1071 1 1. containsAny : negated conditional → KILLED
                if (searchChars[j] == ch) {
1072 1 1. containsAny : negated conditional → KILLED
                    if (Character.isHighSurrogate(ch)) {
1073 1 1. containsAny : negated conditional → KILLED
                        if (j == searchLast) {
1074
                            // missing low surrogate, fine, like String.indexOf(String)
1075 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                            return true;
1076
                        }
1077 5 1. containsAny : changed conditional boundary → KILLED
2. containsAny : Replaced integer addition with subtraction → KILLED
3. containsAny : Replaced integer addition with subtraction → KILLED
4. containsAny : negated conditional → KILLED
5. containsAny : negated conditional → KILLED
                        if (i < csLast && searchChars[j + 1] == cs.charAt(i + 1)) {
1078 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                            return true;
1079
                        }
1080
                    } else {
1081
                        // ch is in the Basic Multilingual Plane
1082 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                        return true;
1083
                    }
1084
                }
1085
            }
1086
        }
1087 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1088
    }
1089
1090
    /**
1091
     * <p>
1092
     * Checks if the CharSequence contains any character in the given set of characters.
1093
     * </p>
1094
     *
1095
     * <p>
1096
     * A {@code null} CharSequence will return {@code false}. A {@code null} search CharSequence will return
1097
     * {@code false}.
1098
     * </p>
1099
     *
1100
     * <pre>
1101
     * StringUtils.containsAny(null, *)               = false
1102
     * StringUtils.containsAny("", *)                 = false
1103
     * StringUtils.containsAny(*, null)               = false
1104
     * StringUtils.containsAny(*, "")                 = false
1105
     * StringUtils.containsAny("zzabyycdxx", "za")    = true
1106
     * StringUtils.containsAny("zzabyycdxx", "by")    = true
1107
     * StringUtils.containsAny("zzabyycdxx", "zy")    = true
1108
     * StringUtils.containsAny("zzabyycdxx", "\tx")   = true
1109
     * StringUtils.containsAny("zzabyycdxx", "$.#yF") = true
1110
     * StringUtils.containsAny("aba", "z")            = false
1111
     * </pre>
1112
     *
1113
     * @param cs
1114
     *            the CharSequence to check, may be null
1115
     * @param searchChars
1116
     *            the chars to search for, may be null
1117
     * @return the {@code true} if any of the chars are found, {@code false} if no match or null input
1118
     * @since 2.4
1119
     * @since 3.0 Changed signature from containsAny(String, String) to containsAny(CharSequence, CharSequence)
1120
     */
1121
    public static boolean containsAny(final CharSequence cs, final CharSequence searchChars) {
1122 1 1. containsAny : negated conditional → KILLED
        if (searchChars == null) {
1123 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1124
        }
1125 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return containsAny(cs, CharSequenceUtils.toCharArray(searchChars));
1126
    }
1127
1128
    /**
1129
     * <p>Checks if the CharSequence contains any of the CharSequences in the given array.</p>
1130
     *
1131
     * <p>
1132
     * A {@code null} {@code cs} CharSequence will return {@code false}. A {@code null} or zero
1133
     * length search array will return {@code false}.
1134
     * </p>
1135
     *
1136
     * <pre>
1137
     * StringUtils.containsAny(null, *)            = false
1138
     * StringUtils.containsAny("", *)              = false
1139
     * StringUtils.containsAny(*, null)            = false
1140
     * StringUtils.containsAny(*, [])              = false
1141
     * StringUtils.containsAny("abcd", "ab", null) = true
1142
     * StringUtils.containsAny("abcd", "ab", "cd") = true
1143
     * StringUtils.containsAny("abc", "d", "abc")  = true
1144
     * </pre>
1145
     *
1146
     *
1147
     * @param cs The CharSequence to check, may be null
1148
     * @param searchCharSequences The array of CharSequences to search for, may be null.
1149
     * Individual CharSequences may be null as well.
1150
     * @return {@code true} if any of the search CharSequences are found, {@code false} otherwise
1151
     * @since 3.4
1152
     */
1153
    public static boolean containsAny(final CharSequence cs, final CharSequence... searchCharSequences) {
1154 2 1. containsAny : negated conditional → KILLED
2. containsAny : negated conditional → KILLED
        if (isEmpty(cs) || ArrayUtils.isEmpty(searchCharSequences)) {
1155 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1156
        }
1157
        for (final CharSequence searchCharSequence : searchCharSequences) {
1158 1 1. containsAny : negated conditional → KILLED
            if (contains(cs, searchCharSequence)) {
1159 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return true;
1160
            }
1161
        }
1162 1 1. containsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1163
    }
1164
1165
    /**
1166
     * <p>Checks if CharSequence contains a search CharSequence irrespective of case,
1167
     * handling {@code null}. Case-insensitivity is defined as by
1168
     * {@link String#equalsIgnoreCase(String)}.
1169
     *
1170
     * <p>A {@code null} CharSequence will return {@code false}.</p>
1171
     *
1172
     * <pre>
1173
     * StringUtils.containsIgnoreCase(null, *) = false
1174
     * StringUtils.containsIgnoreCase(*, null) = false
1175
     * StringUtils.containsIgnoreCase("", "") = true
1176
     * StringUtils.containsIgnoreCase("abc", "") = true
1177
     * StringUtils.containsIgnoreCase("abc", "a") = true
1178
     * StringUtils.containsIgnoreCase("abc", "z") = false
1179
     * StringUtils.containsIgnoreCase("abc", "A") = true
1180
     * StringUtils.containsIgnoreCase("abc", "Z") = false
1181
     * </pre>
1182
     *
1183
     * @param str  the CharSequence to check, may be null
1184
     * @param searchStr  the CharSequence to find, may be null
1185
     * @return true if the CharSequence contains the search CharSequence irrespective of
1186
     * case or false if not or {@code null} string input
1187
     * @since 3.0 Changed signature from containsIgnoreCase(String, String) to containsIgnoreCase(CharSequence, CharSequence)
1188
     */
1189
    public static boolean containsIgnoreCase(final CharSequence str, final CharSequence searchStr) {
1190 2 1. containsIgnoreCase : negated conditional → KILLED
2. containsIgnoreCase : negated conditional → KILLED
        if (str == null || searchStr == null) {
1191 1 1. containsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1192
        }
1193
        final int len = searchStr.length();
1194 1 1. containsIgnoreCase : Replaced integer subtraction with addition → SURVIVED
        final int max = str.length() - len;
1195 3 1. containsIgnoreCase : changed conditional boundary → KILLED
2. containsIgnoreCase : Changed increment from 1 to -1 → KILLED
3. containsIgnoreCase : negated conditional → KILLED
        for (int i = 0; i <= max; i++) {
1196 1 1. containsIgnoreCase : negated conditional → KILLED
            if (CharSequenceUtils.regionMatches(str, true, i, searchStr, 0, len)) {
1197 1 1. containsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return true;
1198
            }
1199
        }
1200 1 1. containsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1201
    }
1202
1203
    // ContainsNone
1204
    //-----------------------------------------------------------------------
1205
    /**
1206
     * <p>Checks that the CharSequence does not contain certain characters.</p>
1207
     *
1208
     * <p>A {@code null} CharSequence will return {@code true}.
1209
     * A {@code null} invalid character array will return {@code true}.
1210
     * An empty CharSequence (length()=0) always returns true.</p>
1211
     *
1212
     * <pre>
1213
     * StringUtils.containsNone(null, *)       = true
1214
     * StringUtils.containsNone(*, null)       = true
1215
     * StringUtils.containsNone("", *)         = true
1216
     * StringUtils.containsNone("ab", '')      = true
1217
     * StringUtils.containsNone("abab", 'xyz') = true
1218
     * StringUtils.containsNone("ab1", 'xyz')  = true
1219
     * StringUtils.containsNone("abz", 'xyz')  = false
1220
     * </pre>
1221
     *
1222
     * @param cs  the CharSequence to check, may be null
1223
     * @param searchChars  an array of invalid chars, may be null
1224
     * @return true if it contains none of the invalid chars, or is null
1225
     * @since 2.0
1226
     * @since 3.0 Changed signature from containsNone(String, char[]) to containsNone(CharSequence, char...)
1227
     */
1228
    public static boolean containsNone(final CharSequence cs, final char... searchChars) {
1229 2 1. containsNone : negated conditional → KILLED
2. containsNone : negated conditional → KILLED
        if (cs == null || searchChars == null) {
1230 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
1231
        }
1232
        final int csLen = cs.length();
1233 1 1. containsNone : Replaced integer subtraction with addition → KILLED
        final int csLast = csLen - 1;
1234
        final int searchLen = searchChars.length;
1235 1 1. containsNone : Replaced integer subtraction with addition → KILLED
        final int searchLast = searchLen - 1;
1236 3 1. containsNone : changed conditional boundary → KILLED
2. containsNone : Changed increment from 1 to -1 → KILLED
3. containsNone : negated conditional → KILLED
        for (int i = 0; i < csLen; i++) {
1237
            final char ch = cs.charAt(i);
1238 3 1. containsNone : changed conditional boundary → KILLED
2. containsNone : Changed increment from 1 to -1 → KILLED
3. containsNone : negated conditional → KILLED
            for (int j = 0; j < searchLen; j++) {
1239 1 1. containsNone : negated conditional → KILLED
                if (searchChars[j] == ch) {
1240 1 1. containsNone : negated conditional → KILLED
                    if (Character.isHighSurrogate(ch)) {
1241 1 1. containsNone : negated conditional → KILLED
                        if (j == searchLast) {
1242
                            // missing low surrogate, fine, like String.indexOf(String)
1243 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                            return false;
1244
                        }
1245 5 1. containsNone : changed conditional boundary → KILLED
2. containsNone : Replaced integer addition with subtraction → KILLED
3. containsNone : Replaced integer addition with subtraction → KILLED
4. containsNone : negated conditional → KILLED
5. containsNone : negated conditional → KILLED
                        if (i < csLast && searchChars[j + 1] == cs.charAt(i + 1)) {
1246 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                            return false;
1247
                        }
1248
                    } else {
1249
                        // ch is in the Basic Multilingual Plane
1250 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                        return false;
1251
                    }
1252
                }
1253
            }
1254
        }
1255 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
1256
    }
1257
1258
    /**
1259
     * <p>Checks that the CharSequence does not contain certain characters.</p>
1260
     *
1261
     * <p>A {@code null} CharSequence will return {@code true}.
1262
     * A {@code null} invalid character array will return {@code true}.
1263
     * An empty String ("") always returns true.</p>
1264
     *
1265
     * <pre>
1266
     * StringUtils.containsNone(null, *)       = true
1267
     * StringUtils.containsNone(*, null)       = true
1268
     * StringUtils.containsNone("", *)         = true
1269
     * StringUtils.containsNone("ab", "")      = true
1270
     * StringUtils.containsNone("abab", "xyz") = true
1271
     * StringUtils.containsNone("ab1", "xyz")  = true
1272
     * StringUtils.containsNone("abz", "xyz")  = false
1273
     * </pre>
1274
     *
1275
     * @param cs  the CharSequence to check, may be null
1276
     * @param invalidChars  a String of invalid chars, may be null
1277
     * @return true if it contains none of the invalid chars, or is null
1278
     * @since 2.0
1279
     * @since 3.0 Changed signature from containsNone(String, String) to containsNone(CharSequence, String)
1280
     */
1281
    public static boolean containsNone(final CharSequence cs, final String invalidChars) {
1282 2 1. containsNone : negated conditional → KILLED
2. containsNone : negated conditional → KILLED
        if (cs == null || invalidChars == null) {
1283 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
1284
        }
1285 1 1. containsNone : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return containsNone(cs, invalidChars.toCharArray());
1286
    }
1287
1288
    // ContainsOnly
1289
    //-----------------------------------------------------------------------
1290
    /**
1291
     * <p>Checks if the CharSequence contains only certain characters.</p>
1292
     *
1293
     * <p>A {@code null} CharSequence will return {@code false}.
1294
     * A {@code null} valid character array will return {@code false}.
1295
     * An empty CharSequence (length()=0) always returns {@code true}.</p>
1296
     *
1297
     * <pre>
1298
     * StringUtils.containsOnly(null, *)       = false
1299
     * StringUtils.containsOnly(*, null)       = false
1300
     * StringUtils.containsOnly("", *)         = true
1301
     * StringUtils.containsOnly("ab", '')      = false
1302
     * StringUtils.containsOnly("abab", 'abc') = true
1303
     * StringUtils.containsOnly("ab1", 'abc')  = false
1304
     * StringUtils.containsOnly("abz", 'abc')  = false
1305
     * </pre>
1306
     *
1307
     * @param cs  the String to check, may be null
1308
     * @param valid  an array of valid chars, may be null
1309
     * @return true if it only contains valid chars and is non-null
1310
     * @since 3.0 Changed signature from containsOnly(String, char[]) to containsOnly(CharSequence, char...)
1311
     */
1312
    public static boolean containsOnly(final CharSequence cs, final char... valid) {
1313
        // All these pre-checks are to maintain API with an older version
1314 2 1. containsOnly : negated conditional → KILLED
2. containsOnly : negated conditional → KILLED
        if (valid == null || cs == null) {
1315 1 1. containsOnly : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1316
        }
1317 1 1. containsOnly : negated conditional → KILLED
        if (cs.length() == 0) {
1318 1 1. containsOnly : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
1319
        }
1320 1 1. containsOnly : negated conditional → KILLED
        if (valid.length == 0) {
1321 1 1. containsOnly : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1322
        }
1323 2 1. containsOnly : negated conditional → KILLED
2. containsOnly : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return indexOfAnyBut(cs, valid) == INDEX_NOT_FOUND;
1324
    }
1325
1326
    /**
1327
     * <p>Checks if the CharSequence contains only certain characters.</p>
1328
     *
1329
     * <p>A {@code null} CharSequence will return {@code false}.
1330
     * A {@code null} valid character String will return {@code false}.
1331
     * An empty String (length()=0) always returns {@code true}.</p>
1332
     *
1333
     * <pre>
1334
     * StringUtils.containsOnly(null, *)       = false
1335
     * StringUtils.containsOnly(*, null)       = false
1336
     * StringUtils.containsOnly("", *)         = true
1337
     * StringUtils.containsOnly("ab", "")      = false
1338
     * StringUtils.containsOnly("abab", "abc") = true
1339
     * StringUtils.containsOnly("ab1", "abc")  = false
1340
     * StringUtils.containsOnly("abz", "abc")  = false
1341
     * </pre>
1342
     *
1343
     * @param cs  the CharSequence to check, may be null
1344
     * @param validChars  a String of valid chars, may be null
1345
     * @return true if it only contains valid chars and is non-null
1346
     * @since 2.0
1347
     * @since 3.0 Changed signature from containsOnly(String, String) to containsOnly(CharSequence, String)
1348
     */
1349
    public static boolean containsOnly(final CharSequence cs, final String validChars) {
1350 2 1. containsOnly : negated conditional → KILLED
2. containsOnly : negated conditional → KILLED
        if (cs == null || validChars == null) {
1351 1 1. containsOnly : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1352
        }
1353 1 1. containsOnly : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return containsOnly(cs, validChars.toCharArray());
1354
    }
1355
1356
    /**
1357
     * <p>Check whether the given CharSequence contains any whitespace characters.</p>
1358
     *
1359
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
1360
     *
1361
     * @param seq the CharSequence to check (may be {@code null})
1362
     * @return {@code true} if the CharSequence is not empty and
1363
     * contains at least 1 (breaking) whitespace character
1364
     * @since 3.0
1365
     */
1366
    // From org.springframework.util.StringUtils, under Apache License 2.0
1367
    public static boolean containsWhitespace(final CharSequence seq) {
1368 1 1. containsWhitespace : negated conditional → KILLED
        if (isEmpty(seq)) {
1369 1 1. containsWhitespace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1370
        }
1371
        final int strLen = seq.length();
1372 3 1. containsWhitespace : changed conditional boundary → KILLED
2. containsWhitespace : Changed increment from 1 to -1 → KILLED
3. containsWhitespace : negated conditional → KILLED
        for (int i = 0; i < strLen; i++) {
1373 1 1. containsWhitespace : negated conditional → KILLED
            if (Character.isWhitespace(seq.charAt(i))) {
1374 1 1. containsWhitespace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return true;
1375
            }
1376
        }
1377 1 1. containsWhitespace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1378
    }
1379
1380
    private static void convertRemainingAccentCharacters(final StringBuilder decomposed) {
1381 2 1. convertRemainingAccentCharacters : changed conditional boundary → KILLED
2. convertRemainingAccentCharacters : negated conditional → KILLED
        for (int i = 0; i < decomposed.length(); i++) {
1382 1 1. convertRemainingAccentCharacters : negated conditional → KILLED
            if (decomposed.charAt(i) == '\u0141') {
1383
                decomposed.deleteCharAt(i);
1384
                decomposed.insert(i, 'L');
1385 1 1. convertRemainingAccentCharacters : negated conditional → KILLED
            } else if (decomposed.charAt(i) == '\u0142') {
1386
                decomposed.deleteCharAt(i);
1387
                decomposed.insert(i, 'l');
1388
            }
1389
        }
1390
    }
1391
1392
    /**
1393
     * <p>Counts how many times the char appears in the given string.</p>
1394
     *
1395
     * <p>A {@code null} or empty ("") String input returns {@code 0}.</p>
1396
     *
1397
     * <pre>
1398
     * StringUtils.countMatches(null, *)       = 0
1399
     * StringUtils.countMatches("", *)         = 0
1400
     * StringUtils.countMatches("abba", 0)  = 0
1401
     * StringUtils.countMatches("abba", 'a')   = 2
1402
     * StringUtils.countMatches("abba", 'b')  = 2
1403
     * StringUtils.countMatches("abba", 'x') = 0
1404
     * </pre>
1405
     *
1406
     * @param str  the CharSequence to check, may be null
1407
     * @param ch  the char to count
1408
     * @return the number of occurrences, 0 if the CharSequence is {@code null}
1409
     * @since 3.4
1410
     */
1411
    public static int countMatches(final CharSequence str, final char ch) {
1412 1 1. countMatches : negated conditional → KILLED
        if (isEmpty(str)) {
1413 1 1. countMatches : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return 0;
1414
        }
1415
        int count = 0;
1416
        // We could also call str.toCharArray() for faster look ups but that would generate more garbage.
1417 2 1. countMatches : changed conditional boundary → KILLED
2. countMatches : negated conditional → KILLED
        for (int i = 0; i < str.length(); i++) {
1418 1 1. countMatches : negated conditional → KILLED
            if (ch == str.charAt(i)) {
1419 1 1. countMatches : Changed increment from 1 to -1 → KILLED
                count++;
1420
            }
1421
        }
1422 1 1. countMatches : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return count;
1423
    }
1424
1425
    // Count matches
1426
    //-----------------------------------------------------------------------
1427
    /**
1428
     * <p>Counts how many times the substring appears in the larger string.</p>
1429
     *
1430
     * <p>A {@code null} or empty ("") String input returns {@code 0}.</p>
1431
     *
1432
     * <pre>
1433
     * StringUtils.countMatches(null, *)       = 0
1434
     * StringUtils.countMatches("", *)         = 0
1435
     * StringUtils.countMatches("abba", null)  = 0
1436
     * StringUtils.countMatches("abba", "")    = 0
1437
     * StringUtils.countMatches("abba", "a")   = 2
1438
     * StringUtils.countMatches("abba", "ab")  = 1
1439
     * StringUtils.countMatches("abba", "xxx") = 0
1440
     * </pre>
1441
     *
1442
     * @param str  the CharSequence to check, may be null
1443
     * @param sub  the substring to count, may be null
1444
     * @return the number of occurrences, 0 if either CharSequence is {@code null}
1445
     * @since 3.0 Changed signature from countMatches(String, String) to countMatches(CharSequence, CharSequence)
1446
     */
1447
    public static int countMatches(final CharSequence str, final CharSequence sub) {
1448 2 1. countMatches : negated conditional → KILLED
2. countMatches : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(sub)) {
1449 1 1. countMatches : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return 0;
1450
        }
1451
        int count = 0;
1452
        int idx = 0;
1453 1 1. countMatches : negated conditional → KILLED
        while ((idx = CharSequenceUtils.indexOf(str, sub, idx)) != INDEX_NOT_FOUND) {
1454 1 1. countMatches : Changed increment from 1 to -1 → KILLED
            count++;
1455 1 1. countMatches : Replaced integer addition with subtraction → TIMED_OUT
            idx += sub.length();
1456
        }
1457 1 1. countMatches : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return count;
1458
    }
1459
1460
    /**
1461
     * <p>Returns either the passed in CharSequence, or if the CharSequence is
1462
     * whitespace, empty ("") or {@code null}, the value of {@code defaultStr}.</p>
1463
     *
1464
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
1465
     *
1466
     * <pre>
1467
     * StringUtils.defaultIfBlank(null, "NULL")  = "NULL"
1468
     * StringUtils.defaultIfBlank("", "NULL")    = "NULL"
1469
     * StringUtils.defaultIfBlank(" ", "NULL")   = "NULL"
1470
     * StringUtils.defaultIfBlank("bat", "NULL") = "bat"
1471
     * StringUtils.defaultIfBlank("", null)      = null
1472
     * </pre>
1473
     * @param <T> the specific kind of CharSequence
1474
     * @param str the CharSequence to check, may be null
1475
     * @param defaultStr  the default CharSequence to return
1476
     *  if the input is whitespace, empty ("") or {@code null}, may be null
1477
     * @return the passed in CharSequence, or the default
1478
     * @see StringUtils#defaultString(String, String)
1479
     */
1480
    public static <T extends CharSequence> T defaultIfBlank(final T str, final T defaultStr) {
1481 2 1. defaultIfBlank : negated conditional → KILLED
2. defaultIfBlank : mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultIfBlank to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return isBlank(str) ? defaultStr : str;
1482
    }
1483
1484
1485
    /**
1486
     * <p>Returns either the passed in CharSequence, or if the CharSequence is
1487
     * empty or {@code null}, the value of {@code defaultStr}.</p>
1488
     *
1489
     * <pre>
1490
     * StringUtils.defaultIfEmpty(null, "NULL")  = "NULL"
1491
     * StringUtils.defaultIfEmpty("", "NULL")    = "NULL"
1492
     * StringUtils.defaultIfEmpty(" ", "NULL")   = " "
1493
     * StringUtils.defaultIfEmpty("bat", "NULL") = "bat"
1494
     * StringUtils.defaultIfEmpty("", null)      = null
1495
     * </pre>
1496
     * @param <T> the specific kind of CharSequence
1497
     * @param str  the CharSequence to check, may be null
1498
     * @param defaultStr  the default CharSequence to return
1499
     *  if the input is empty ("") or {@code null}, may be null
1500
     * @return the passed in CharSequence, or the default
1501
     * @see StringUtils#defaultString(String, String)
1502
     */
1503
    public static <T extends CharSequence> T defaultIfEmpty(final T str, final T defaultStr) {
1504 2 1. defaultIfEmpty : negated conditional → KILLED
2. defaultIfEmpty : mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultIfEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return isEmpty(str) ? defaultStr : str;
1505
    }
1506
1507
    // Defaults
1508
    //-----------------------------------------------------------------------
1509
    /**
1510
     * <p>Returns either the passed in String,
1511
     * or if the String is {@code null}, an empty String ("").</p>
1512
     *
1513
     * <pre>
1514
     * StringUtils.defaultString(null)  = ""
1515
     * StringUtils.defaultString("")    = ""
1516
     * StringUtils.defaultString("bat") = "bat"
1517
     * </pre>
1518
     *
1519
     * @see ObjectUtils#toString(Object)
1520
     * @see String#valueOf(Object)
1521
     * @param str  the String to check, may be null
1522
     * @return the passed in String, or the empty String if it
1523
     *  was {@code null}
1524
     */
1525
    public static String defaultString(final String str) {
1526 1 1. defaultString : mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultString to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return defaultString(str, EMPTY);
1527
    }
1528
1529
    /**
1530
     * <p>Returns either the passed in String, or if the String is
1531
     * {@code null}, the value of {@code defaultStr}.</p>
1532
     *
1533
     * <pre>
1534
     * StringUtils.defaultString(null, "NULL")  = "NULL"
1535
     * StringUtils.defaultString("", "NULL")    = ""
1536
     * StringUtils.defaultString("bat", "NULL") = "bat"
1537
     * </pre>
1538
     *
1539
     * @see ObjectUtils#toString(Object,String)
1540
     * @see String#valueOf(Object)
1541
     * @param str  the String to check, may be null
1542
     * @param defaultStr  the default String to return
1543
     *  if the input is {@code null}, may be null
1544
     * @return the passed in String, or the default if it was {@code null}
1545
     */
1546
    public static String defaultString(final String str, final String defaultStr) {
1547 2 1. defaultString : negated conditional → KILLED
2. defaultString : mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultString to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str == null ? defaultStr : str;
1548
    }
1549
1550
    // Delete
1551
    //-----------------------------------------------------------------------
1552
    /**
1553
     * <p>Deletes all whitespaces from a String as defined by
1554
     * {@link Character#isWhitespace(char)}.</p>
1555
     *
1556
     * <pre>
1557
     * StringUtils.deleteWhitespace(null)         = null
1558
     * StringUtils.deleteWhitespace("")           = ""
1559
     * StringUtils.deleteWhitespace("abc")        = "abc"
1560
     * StringUtils.deleteWhitespace("   ab  c  ") = "abc"
1561
     * </pre>
1562
     *
1563
     * @param str  the String to delete whitespace from, may be null
1564
     * @return the String without whitespaces, {@code null} if null String input
1565
     */
1566
    public static String deleteWhitespace(final String str) {
1567 1 1. deleteWhitespace : negated conditional → KILLED
        if (isEmpty(str)) {
1568 1 1. deleteWhitespace : mutated return of Object value for org/apache/commons/lang3/StringUtils::deleteWhitespace to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
1569
        }
1570
        final int sz = str.length();
1571
        final char[] chs = new char[sz];
1572
        int count = 0;
1573 3 1. deleteWhitespace : changed conditional boundary → KILLED
2. deleteWhitespace : Changed increment from 1 to -1 → KILLED
3. deleteWhitespace : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
1574 1 1. deleteWhitespace : negated conditional → KILLED
            if (!Character.isWhitespace(str.charAt(i))) {
1575 1 1. deleteWhitespace : Changed increment from 1 to -1 → KILLED
                chs[count++] = str.charAt(i);
1576
            }
1577
        }
1578 1 1. deleteWhitespace : negated conditional → KILLED
        if (count == sz) {
1579 1 1. deleteWhitespace : mutated return of Object value for org/apache/commons/lang3/StringUtils::deleteWhitespace to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
1580
        }
1581 1 1. deleteWhitespace : mutated return of Object value for org/apache/commons/lang3/StringUtils::deleteWhitespace to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(chs, 0, count);
1582
    }
1583
1584
    // Difference
1585
    //-----------------------------------------------------------------------
1586
    /**
1587
     * <p>Compares two Strings, and returns the portion where they differ.
1588
     * More precisely, return the remainder of the second String,
1589
     * starting from where it's different from the first. This means that
1590
     * the difference between "abc" and "ab" is the empty String and not "c". </p>
1591
     *
1592
     * <p>For example,
1593
     * {@code difference("i am a machine", "i am a robot") -> "robot"}.</p>
1594
     *
1595
     * <pre>
1596
     * StringUtils.difference(null, null) = null
1597
     * StringUtils.difference("", "") = ""
1598
     * StringUtils.difference("", "abc") = "abc"
1599
     * StringUtils.difference("abc", "") = ""
1600
     * StringUtils.difference("abc", "abc") = ""
1601
     * StringUtils.difference("abc", "ab") = ""
1602
     * StringUtils.difference("ab", "abxyz") = "xyz"
1603
     * StringUtils.difference("abcde", "abxyz") = "xyz"
1604
     * StringUtils.difference("abcde", "xyz") = "xyz"
1605
     * </pre>
1606
     *
1607
     * @param str1  the first String, may be null
1608
     * @param str2  the second String, may be null
1609
     * @return the portion of str2 where it differs from str1; returns the
1610
     * empty String if they are equal
1611
     * @see #indexOfDifference(CharSequence,CharSequence)
1612
     * @since 2.0
1613
     */
1614
    public static String difference(final String str1, final String str2) {
1615 1 1. difference : negated conditional → KILLED
        if (str1 == null) {
1616 1 1. difference : mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str2;
1617
        }
1618 1 1. difference : negated conditional → KILLED
        if (str2 == null) {
1619 1 1. difference : mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str1;
1620
        }
1621
        final int at = indexOfDifference(str1, str2);
1622 1 1. difference : negated conditional → KILLED
        if (at == INDEX_NOT_FOUND) {
1623 1 1. difference : mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
1624
        }
1625 1 1. difference : mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str2.substring(at);
1626
    }
1627
1628
    /**
1629
     * <p>Check if a CharSequence ends with a specified suffix.</p>
1630
     *
1631
     * <p>{@code null}s are handled without exceptions. Two {@code null}
1632
     * references are considered to be equal. The comparison is case sensitive.</p>
1633
     *
1634
     * <pre>
1635
     * StringUtils.endsWith(null, null)      = true
1636
     * StringUtils.endsWith(null, "def")     = false
1637
     * StringUtils.endsWith("abcdef", null)  = false
1638
     * StringUtils.endsWith("abcdef", "def") = true
1639
     * StringUtils.endsWith("ABCDEF", "def") = false
1640
     * StringUtils.endsWith("ABCDEF", "cde") = false
1641
     * StringUtils.endsWith("ABCDEF", "")    = true
1642
     * </pre>
1643
     *
1644
     * @see java.lang.String#endsWith(String)
1645
     * @param str  the CharSequence to check, may be null
1646
     * @param suffix the suffix to find, may be null
1647
     * @return {@code true} if the CharSequence ends with the suffix, case sensitive, or
1648
     *  both {@code null}
1649
     * @since 2.4
1650
     * @since 3.0 Changed signature from endsWith(String, String) to endsWith(CharSequence, CharSequence)
1651
     */
1652
    public static boolean endsWith(final CharSequence str, final CharSequence suffix) {
1653 1 1. endsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return endsWith(str, suffix, false);
1654
    }
1655
1656
    /**
1657
     * <p>Check if a CharSequence ends with a specified suffix (optionally case insensitive).</p>
1658
     *
1659
     * @see java.lang.String#endsWith(String)
1660
     * @param str  the CharSequence to check, may be null
1661
     * @param suffix the suffix to find, may be null
1662
     * @param ignoreCase indicates whether the compare should ignore case
1663
     *  (case insensitive) or not.
1664
     * @return {@code true} if the CharSequence starts with the prefix or
1665
     *  both {@code null}
1666
     */
1667
    private static boolean endsWith(final CharSequence str, final CharSequence suffix, final boolean ignoreCase) {
1668 2 1. endsWith : negated conditional → KILLED
2. endsWith : negated conditional → KILLED
        if (str == null || suffix == null) {
1669 2 1. endsWith : negated conditional → KILLED
2. endsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return str == suffix;
1670
        }
1671 2 1. endsWith : changed conditional boundary → SURVIVED
2. endsWith : negated conditional → KILLED
        if (suffix.length() > str.length()) {
1672 1 1. endsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1673
        }
1674 1 1. endsWith : Replaced integer subtraction with addition → KILLED
        final int strOffset = str.length() - suffix.length();
1675 1 1. endsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.regionMatches(str, ignoreCase, strOffset, suffix, 0, suffix.length());
1676
    }
1677
1678
    /**
1679
     * <p>Check if a CharSequence ends with any of the provided case-sensitive suffixes.</p>
1680
     *
1681
     * <pre>
1682
     * StringUtils.endsWithAny(null, null)      = false
1683
     * StringUtils.endsWithAny(null, new String[] {"abc"})  = false
1684
     * StringUtils.endsWithAny("abcxyz", null)     = false
1685
     * StringUtils.endsWithAny("abcxyz", new String[] {""}) = true
1686
     * StringUtils.endsWithAny("abcxyz", new String[] {"xyz"}) = true
1687
     * StringUtils.endsWithAny("abcxyz", new String[] {null, "xyz", "abc"}) = true
1688
     * StringUtils.endsWithAny("abcXYZ", "def", "XYZ") = true
1689
     * StringUtils.endsWithAny("abcXYZ", "def", "xyz") = false
1690
     * </pre>
1691
     *
1692
     * @param sequence  the CharSequence to check, may be null
1693
     * @param searchStrings the case-sensitive CharSequences to find, may be empty or contain {@code null}
1694
     * @see StringUtils#endsWith(CharSequence, CharSequence)
1695
     * @return {@code true} if the input {@code sequence} is {@code null} AND no {@code searchStrings} are provided, or
1696
     *   the input {@code sequence} ends in any of the provided case-sensitive {@code searchStrings}.
1697
     * @since 3.0
1698
     */
1699
    public static boolean endsWithAny(final CharSequence sequence, final CharSequence... searchStrings) {
1700 2 1. endsWithAny : negated conditional → KILLED
2. endsWithAny : negated conditional → KILLED
        if (isEmpty(sequence) || ArrayUtils.isEmpty(searchStrings)) {
1701 1 1. endsWithAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1702
        }
1703
        for (final CharSequence searchString : searchStrings) {
1704 1 1. endsWithAny : negated conditional → KILLED
            if (endsWith(sequence, searchString)) {
1705 1 1. endsWithAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return true;
1706
            }
1707
        }
1708 1 1. endsWithAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1709
    }
1710
1711
    /**
1712
     * <p>Case insensitive check if a CharSequence ends with a specified suffix.</p>
1713
     *
1714
     * <p>{@code null}s are handled without exceptions. Two {@code null}
1715
     * references are considered to be equal. The comparison is case insensitive.</p>
1716
     *
1717
     * <pre>
1718
     * StringUtils.endsWithIgnoreCase(null, null)      = true
1719
     * StringUtils.endsWithIgnoreCase(null, "def")     = false
1720
     * StringUtils.endsWithIgnoreCase("abcdef", null)  = false
1721
     * StringUtils.endsWithIgnoreCase("abcdef", "def") = true
1722
     * StringUtils.endsWithIgnoreCase("ABCDEF", "def") = true
1723
     * StringUtils.endsWithIgnoreCase("ABCDEF", "cde") = false
1724
     * </pre>
1725
     *
1726
     * @see java.lang.String#endsWith(String)
1727
     * @param str  the CharSequence to check, may be null
1728
     * @param suffix the suffix to find, may be null
1729
     * @return {@code true} if the CharSequence ends with the suffix, case insensitive, or
1730
     *  both {@code null}
1731
     * @since 2.4
1732
     * @since 3.0 Changed signature from endsWithIgnoreCase(String, String) to endsWithIgnoreCase(CharSequence, CharSequence)
1733
     */
1734
    public static boolean endsWithIgnoreCase(final CharSequence str, final CharSequence suffix) {
1735 1 1. endsWithIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return endsWith(str, suffix, true);
1736
    }
1737
1738
    // Equals
1739
    //-----------------------------------------------------------------------
1740
    /**
1741
     * <p>Compares two CharSequences, returning {@code true} if they represent
1742
     * equal sequences of characters.</p>
1743
     *
1744
     * <p>{@code null}s are handled without exceptions. Two {@code null}
1745
     * references are considered to be equal. The comparison is <strong>case sensitive</strong>.</p>
1746
     *
1747
     * <pre>
1748
     * StringUtils.equals(null, null)   = true
1749
     * StringUtils.equals(null, "abc")  = false
1750
     * StringUtils.equals("abc", null)  = false
1751
     * StringUtils.equals("abc", "abc") = true
1752
     * StringUtils.equals("abc", "ABC") = false
1753
     * </pre>
1754
     *
1755
     * @param cs1  the first CharSequence, may be {@code null}
1756
     * @param cs2  the second CharSequence, may be {@code null}
1757
     * @return {@code true} if the CharSequences are equal (case-sensitive), or both {@code null}
1758
     * @since 3.0 Changed signature from equals(String, String) to equals(CharSequence, CharSequence)
1759
     * @see Object#equals(Object)
1760
     * @see #equalsIgnoreCase(CharSequence, CharSequence)
1761
     */
1762
    public static boolean equals(final CharSequence cs1, final CharSequence cs2) {
1763 1 1. equals : negated conditional → KILLED
        if (cs1 == cs2) {
1764 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
1765
        }
1766 2 1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
        if (cs1 == null || cs2 == null) {
1767 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1768
        }
1769 1 1. equals : negated conditional → KILLED
        if (cs1.length() != cs2.length()) {
1770 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1771
        }
1772 2 1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
        if (cs1 instanceof String && cs2 instanceof String) {
1773 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return cs1.equals(cs2);
1774
        }
1775
        // Step-wise comparison
1776
        final int length = cs1.length();
1777 3 1. equals : changed conditional boundary → KILLED
2. equals : Changed increment from 1 to -1 → KILLED
3. equals : negated conditional → KILLED
        for (int i = 0; i < length; i++) {
1778 1 1. equals : negated conditional → KILLED
            if (cs1.charAt(i) != cs2.charAt(i)) {
1779 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
1780
            }
1781
        }
1782 1 1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
1783
    }
1784
1785
    /**
1786
     * <p>Compares given <code>string</code> to a CharSequences vararg of <code>searchStrings</code>,
1787
     * returning {@code true} if the <code>string</code> is equal to any of the <code>searchStrings</code>.</p>
1788
     *
1789
     * <pre>
1790
     * StringUtils.equalsAny(null, (CharSequence[]) null) = false
1791
     * StringUtils.equalsAny(null, null, null)    = true
1792
     * StringUtils.equalsAny(null, "abc", "def")  = false
1793
     * StringUtils.equalsAny("abc", null, "def")  = false
1794
     * StringUtils.equalsAny("abc", "abc", "def") = true
1795
     * StringUtils.equalsAny("abc", "ABC", "DEF") = false
1796
     * </pre>
1797
     *
1798
     * @param string to compare, may be {@code null}.
1799
     * @param searchStrings a vararg of strings, may be {@code null}.
1800
     * @return {@code true} if the string is equal (case-sensitive) to any other element of <code>searchStrings</code>;
1801
     * {@code false} if <code>searchStrings</code> is null or contains no matches.
1802
     * @since 3.5
1803
     */
1804
    public static boolean equalsAny(final CharSequence string, final CharSequence... searchStrings) {
1805 1 1. equalsAny : negated conditional → KILLED
        if (ArrayUtils.isNotEmpty(searchStrings)) {
1806
            for (final CharSequence next : searchStrings) {
1807 1 1. equalsAny : negated conditional → KILLED
                if (equals(string, next)) {
1808 1 1. equalsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                    return true;
1809
                }
1810
            }
1811
        }
1812 1 1. equalsAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1813
    }
1814
1815
    /**
1816
     * <p>Compares given <code>string</code> to a CharSequences vararg of <code>searchStrings</code>,
1817
     * returning {@code true} if the <code>string</code> is equal to any of the <code>searchStrings</code>, ignoring case.</p>
1818
     *
1819
     * <pre>
1820
     * StringUtils.equalsAnyIgnoreCase(null, (CharSequence[]) null) = false
1821
     * StringUtils.equalsAnyIgnoreCase(null, null, null)    = true
1822
     * StringUtils.equalsAnyIgnoreCase(null, "abc", "def")  = false
1823
     * StringUtils.equalsAnyIgnoreCase("abc", null, "def")  = false
1824
     * StringUtils.equalsAnyIgnoreCase("abc", "abc", "def") = true
1825
     * StringUtils.equalsAnyIgnoreCase("abc", "ABC", "DEF") = true
1826
     * </pre>
1827
     *
1828
     * @param string to compare, may be {@code null}.
1829
     * @param searchStrings a vararg of strings, may be {@code null}.
1830
     * @return {@code true} if the string is equal (case-insensitive) to any other element of <code>searchStrings</code>;
1831
     * {@code false} if <code>searchStrings</code> is null or contains no matches.
1832
     * @since 3.5
1833
     */
1834
    public static boolean equalsAnyIgnoreCase(final CharSequence string, final CharSequence...searchStrings) {
1835 1 1. equalsAnyIgnoreCase : negated conditional → KILLED
        if (ArrayUtils.isNotEmpty(searchStrings)) {
1836
            for (final CharSequence next : searchStrings) {
1837 1 1. equalsAnyIgnoreCase : negated conditional → KILLED
                if (equalsIgnoreCase(string, next)) {
1838 1 1. equalsAnyIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                    return true;
1839
                }
1840
            }
1841
        }
1842 1 1. equalsAnyIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
1843
    }
1844
1845
    /**
1846
     * <p>Compares two CharSequences, returning {@code true} if they represent
1847
     * equal sequences of characters, ignoring case.</p>
1848
     *
1849
     * <p>{@code null}s are handled without exceptions. Two {@code null}
1850
     * references are considered equal. The comparison is <strong>case insensitive</strong>.</p>
1851
     *
1852
     * <pre>
1853
     * StringUtils.equalsIgnoreCase(null, null)   = true
1854
     * StringUtils.equalsIgnoreCase(null, "abc")  = false
1855
     * StringUtils.equalsIgnoreCase("abc", null)  = false
1856
     * StringUtils.equalsIgnoreCase("abc", "abc") = true
1857
     * StringUtils.equalsIgnoreCase("abc", "ABC") = true
1858
     * </pre>
1859
     *
1860
     * @param cs1  the first CharSequence, may be {@code null}
1861
     * @param cs2  the second CharSequence, may be {@code null}
1862
     * @return {@code true} if the CharSequences are equal (case-insensitive), or both {@code null}
1863
     * @since 3.0 Changed signature from equalsIgnoreCase(String, String) to equalsIgnoreCase(CharSequence, CharSequence)
1864
     * @see #equals(CharSequence, CharSequence)
1865
     */
1866
    public static boolean equalsIgnoreCase(final CharSequence cs1, final CharSequence cs2) {
1867 1 1. equalsIgnoreCase : negated conditional → KILLED
        if (cs1 == cs2) {
1868 1 1. equalsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
1869
        }
1870 2 1. equalsIgnoreCase : negated conditional → KILLED
2. equalsIgnoreCase : negated conditional → KILLED
        if (cs1 == null || cs2 == null) {
1871 1 1. equalsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1872
        }
1873 1 1. equalsIgnoreCase : negated conditional → KILLED
        if (cs1.length() != cs2.length()) {
1874 1 1. equalsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
1875
        }
1876 1 1. equalsIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.regionMatches(cs1, true, 0, cs2, 0, cs1.length());
1877
    }
1878
1879
    /**
1880
     * <p>Returns the first value in the array which is not empty (""),
1881
     * {@code null} or whitespace only.</p>
1882
     *
1883
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
1884
     *
1885
     * <p>If all values are blank or the array is {@code null}
1886
     * or empty then {@code null} is returned.</p>
1887
     *
1888
     * <pre>
1889
     * StringUtils.firstNonBlank(null, null, null)     = null
1890
     * StringUtils.firstNonBlank(null, "", " ")        = null
1891
     * StringUtils.firstNonBlank("abc")                = "abc"
1892
     * StringUtils.firstNonBlank(null, "xyz")          = "xyz"
1893
     * StringUtils.firstNonBlank(null, "", " ", "xyz") = "xyz"
1894
     * StringUtils.firstNonBlank(null, "xyz", "abc")   = "xyz"
1895
     * StringUtils.firstNonBlank()                     = null
1896
     * </pre>
1897
     *
1898
     * @param <T> the specific kind of CharSequence
1899
     * @param values  the values to test, may be {@code null} or empty
1900
     * @return the first value from {@code values} which is not blank,
1901
     *  or {@code null} if there are no non-blank values
1902
     * @since 3.8
1903
     */
1904
    @SafeVarargs
1905
    public static <T extends CharSequence> T firstNonBlank(final T... values) {
1906 1 1. firstNonBlank : negated conditional → KILLED
        if (values != null) {
1907
            for (final T val : values) {
1908 1 1. firstNonBlank : negated conditional → KILLED
                if (isNotBlank(val)) {
1909 1 1. firstNonBlank : mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonBlank to ( if (x != null) null else throw new RuntimeException ) → KILLED
                    return val;
1910
                }
1911
            }
1912
        }
1913 1 1. firstNonBlank : mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonBlank to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return null;
1914
    }
1915
1916
    /**
1917
     * <p>Returns the first value in the array which is not empty.</p>
1918
     *
1919
     * <p>If all values are empty or the array is {@code null}
1920
     * or empty then {@code null} is returned.</p>
1921
     *
1922
     * <pre>
1923
     * StringUtils.firstNonEmpty(null, null, null)   = null
1924
     * StringUtils.firstNonEmpty(null, null, "")     = null
1925
     * StringUtils.firstNonEmpty(null, "", " ")      = " "
1926
     * StringUtils.firstNonEmpty("abc")              = "abc"
1927
     * StringUtils.firstNonEmpty(null, "xyz")        = "xyz"
1928
     * StringUtils.firstNonEmpty("", "xyz")          = "xyz"
1929
     * StringUtils.firstNonEmpty(null, "xyz", "abc") = "xyz"
1930
     * StringUtils.firstNonEmpty()                   = null
1931
     * </pre>
1932
     *
1933
     * @param <T> the specific kind of CharSequence
1934
     * @param values  the values to test, may be {@code null} or empty
1935
     * @return the first value from {@code values} which is not empty,
1936
     *  or {@code null} if there are no non-empty values
1937
     * @since 3.8
1938
     */
1939
    @SafeVarargs
1940
    public static <T extends CharSequence> T firstNonEmpty(final T... values) {
1941 1 1. firstNonEmpty : negated conditional → KILLED
        if (values != null) {
1942
            for (final T val : values) {
1943 1 1. firstNonEmpty : negated conditional → KILLED
                if (isNotEmpty(val)) {
1944 1 1. firstNonEmpty : mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED
                    return val;
1945
                }
1946
            }
1947
        }
1948 1 1. firstNonEmpty : mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return null;
1949
    }
1950
1951
    /**
1952
     * Calls {@link String#getBytes(Charset)} in a null-safe manner.
1953
     *
1954
     * @param string input string
1955
     * @param charset The {@link Charset} to encode the {@code String}. If null, then use the default Charset.
1956
     * @return The empty byte[] if {@code string} is null, the result of {@link String#getBytes(Charset)} otherwise.
1957
     * @see String#getBytes(Charset)
1958
     * @since 3.10
1959
     */
1960
    public static byte[] getBytes(final String string, final Charset charset) {
1961 2 1. getBytes : negated conditional → KILLED
2. getBytes : mutated return of Object value for org/apache/commons/lang3/StringUtils::getBytes to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return string == null ? ArrayUtils.EMPTY_BYTE_ARRAY : string.getBytes(Charsets.toCharset(charset));
1962
    }
1963
1964
    /**
1965
     * Calls {@link String#getBytes(String)} in a null-safe manner.
1966
     *
1967
     * @param string input string
1968
     * @param charset The {@link Charset} name to encode the {@code String}. If null, then use the default Charset.
1969
     * @return The empty byte[] if {@code string} is null, the result of {@link String#getBytes(String)} otherwise.
1970
     * @throws UnsupportedEncodingException Thrown when the named charset is not supported.
1971
     * @see String#getBytes(String)
1972
     * @since 3.10
1973
     */
1974
    public static byte[] getBytes(final String string, final String charset) throws UnsupportedEncodingException {
1975 2 1. getBytes : negated conditional → KILLED
2. getBytes : mutated return of Object value for org/apache/commons/lang3/StringUtils::getBytes to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return string == null ? ArrayUtils.EMPTY_BYTE_ARRAY : string.getBytes(Charsets.toCharsetName(charset));
1976
    }
1977
1978
    /**
1979
     * <p>Compares all Strings in an array and returns the initial sequence of
1980
     * characters that is common to all of them.</p>
1981
     *
1982
     * <p>For example,
1983
     * <code>getCommonPrefix(new String[] {"i am a machine", "i am a robot"}) -&gt; "i am a "</code></p>
1984
     *
1985
     * <pre>
1986
     * StringUtils.getCommonPrefix(null) = ""
1987
     * StringUtils.getCommonPrefix(new String[] {}) = ""
1988
     * StringUtils.getCommonPrefix(new String[] {"abc"}) = "abc"
1989
     * StringUtils.getCommonPrefix(new String[] {null, null}) = ""
1990
     * StringUtils.getCommonPrefix(new String[] {"", ""}) = ""
1991
     * StringUtils.getCommonPrefix(new String[] {"", null}) = ""
1992
     * StringUtils.getCommonPrefix(new String[] {"abc", null, null}) = ""
1993
     * StringUtils.getCommonPrefix(new String[] {null, null, "abc"}) = ""
1994
     * StringUtils.getCommonPrefix(new String[] {"", "abc"}) = ""
1995
     * StringUtils.getCommonPrefix(new String[] {"abc", ""}) = ""
1996
     * StringUtils.getCommonPrefix(new String[] {"abc", "abc"}) = "abc"
1997
     * StringUtils.getCommonPrefix(new String[] {"abc", "a"}) = "a"
1998
     * StringUtils.getCommonPrefix(new String[] {"ab", "abxyz"}) = "ab"
1999
     * StringUtils.getCommonPrefix(new String[] {"abcde", "abxyz"}) = "ab"
2000
     * StringUtils.getCommonPrefix(new String[] {"abcde", "xyz"}) = ""
2001
     * StringUtils.getCommonPrefix(new String[] {"xyz", "abcde"}) = ""
2002
     * StringUtils.getCommonPrefix(new String[] {"i am a machine", "i am a robot"}) = "i am a "
2003
     * </pre>
2004
     *
2005
     * @param strs  array of String objects, entries may be null
2006
     * @return the initial sequence of characters that are common to all Strings
2007
     * in the array; empty String if the array is null, the elements are all null
2008
     * or if there is no common prefix.
2009
     * @since 2.4
2010
     */
2011
    public static String getCommonPrefix(final String... strs) {
2012 2 1. getCommonPrefix : negated conditional → KILLED
2. getCommonPrefix : negated conditional → KILLED
        if (strs == null || strs.length == 0) {
2013 1 1. getCommonPrefix : mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
2014
        }
2015
        final int smallestIndexOfDiff = indexOfDifference(strs);
2016 1 1. getCommonPrefix : negated conditional → KILLED
        if (smallestIndexOfDiff == INDEX_NOT_FOUND) {
2017
            // all strings were identical
2018 1 1. getCommonPrefix : negated conditional → KILLED
            if (strs[0] == null) {
2019 1 1. getCommonPrefix : mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return EMPTY;
2020
            }
2021 1 1. getCommonPrefix : mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return strs[0];
2022 1 1. getCommonPrefix : negated conditional → KILLED
        } else if (smallestIndexOfDiff == 0) {
2023
            // there were no common initial characters
2024 1 1. getCommonPrefix : mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
2025
        } else {
2026
            // we found a common initial character sequence
2027 1 1. getCommonPrefix : mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return strs[0].substring(0, smallestIndexOfDiff);
2028
        }
2029
    }
2030
2031
    /**
2032
     * <p>Checks if a String {@code str} contains Unicode digits,
2033
     * if yes then concatenate all the digits in {@code str} and return it as a String.</p>
2034
     *
2035
     * <p>An empty ("") String will be returned if no digits found in {@code str}.</p>
2036
     *
2037
     * <pre>
2038
     * StringUtils.getDigits(null)  = null
2039
     * StringUtils.getDigits("")    = ""
2040
     * StringUtils.getDigits("abc") = ""
2041
     * StringUtils.getDigits("1000$") = "1000"
2042
     * StringUtils.getDigits("1123~45") = "112345"
2043
     * StringUtils.getDigits("(541) 754-3010") = "5417543010"
2044
     * StringUtils.getDigits("\u0967\u0968\u0969") = "\u0967\u0968\u0969"
2045
     * </pre>
2046
     *
2047
     * @param str the String to extract digits from, may be null
2048
     * @return String with only digits,
2049
     *           or an empty ("") String if no digits found,
2050
     *           or {@code null} String if {@code str} is null
2051
     * @since 3.6
2052
     */
2053
    public static String getDigits(final String str) {
2054 1 1. getDigits : negated conditional → KILLED
        if (isEmpty(str)) {
2055 1 1. getDigits : mutated return of Object value for org/apache/commons/lang3/StringUtils::getDigits to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
2056
        }
2057
        final int sz = str.length();
2058
        final StringBuilder strDigits = new StringBuilder(sz);
2059 3 1. getDigits : changed conditional boundary → KILLED
2. getDigits : Changed increment from 1 to -1 → KILLED
3. getDigits : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
2060
            final char tempChar = str.charAt(i);
2061 1 1. getDigits : negated conditional → KILLED
            if (Character.isDigit(tempChar)) {
2062
                strDigits.append(tempChar);
2063
            }
2064
        }
2065 1 1. getDigits : mutated return of Object value for org/apache/commons/lang3/StringUtils::getDigits to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return strDigits.toString();
2066
    }
2067
2068
    /**
2069
     * <p>Find the Fuzzy Distance which indicates the similarity score between two Strings.</p>
2070
     *
2071
     * <p>This string matching algorithm is similar to the algorithms of editors such as Sublime Text,
2072
     * TextMate, Atom and others. One point is given for every matched character. Subsequent
2073
     * matches yield two bonus points. A higher score indicates a higher similarity.</p>
2074
     *
2075
     * <pre>
2076
     * StringUtils.getFuzzyDistance(null, null, null)                                    = IllegalArgumentException
2077
     * StringUtils.getFuzzyDistance("", "", Locale.ENGLISH)                              = 0
2078
     * StringUtils.getFuzzyDistance("Workshop", "b", Locale.ENGLISH)                     = 0
2079
     * StringUtils.getFuzzyDistance("Room", "o", Locale.ENGLISH)                         = 1
2080
     * StringUtils.getFuzzyDistance("Workshop", "w", Locale.ENGLISH)                     = 1
2081
     * StringUtils.getFuzzyDistance("Workshop", "ws", Locale.ENGLISH)                    = 2
2082
     * StringUtils.getFuzzyDistance("Workshop", "wo", Locale.ENGLISH)                    = 4
2083
     * StringUtils.getFuzzyDistance("Apache Software Foundation", "asf", Locale.ENGLISH) = 3
2084
     * </pre>
2085
     *
2086
     * @param term a full term that should be matched against, must not be null
2087
     * @param query the query that will be matched against a term, must not be null
2088
     * @param locale This string matching logic is case insensitive. A locale is necessary to normalize
2089
     *  both Strings to lower case.
2090
     * @return result score
2091
     * @throws IllegalArgumentException if either String input {@code null} or Locale input {@code null}
2092
     * @since 3.4
2093
     * @deprecated as of 3.6, use commons-text
2094
     * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/similarity/FuzzyScore.html">
2095
     * FuzzyScore</a> instead
2096
     */
2097
    @Deprecated
2098
    public static int getFuzzyDistance(final CharSequence term, final CharSequence query, final Locale locale) {
2099 2 1. getFuzzyDistance : negated conditional → KILLED
2. getFuzzyDistance : negated conditional → KILLED
        if (term == null || query == null) {
2100
            throw new IllegalArgumentException("Strings must not be null");
2101 1 1. getFuzzyDistance : negated conditional → KILLED
        } else if (locale == null) {
2102
            throw new IllegalArgumentException("Locale must not be null");
2103
        }
2104
2105
        // fuzzy logic is case insensitive. We normalize the Strings to lower
2106
        // case right from the start. Turning characters to lower case
2107
        // via Character.toLowerCase(char) is unfortunately insufficient
2108
        // as it does not accept a locale.
2109
        final String termLowerCase = term.toString().toLowerCase(locale);
2110
        final String queryLowerCase = query.toString().toLowerCase(locale);
2111
2112
        // the resulting score
2113
        int score = 0;
2114
2115
        // the position in the term which will be scanned next for potential
2116
        // query character matches
2117
        int termIndex = 0;
2118
2119
        // index of the previously matched character in the term
2120
        int previousMatchingCharacterIndex = Integer.MIN_VALUE;
2121
2122 3 1. getFuzzyDistance : changed conditional boundary → KILLED
2. getFuzzyDistance : Changed increment from 1 to -1 → KILLED
3. getFuzzyDistance : negated conditional → KILLED
        for (int queryIndex = 0; queryIndex < queryLowerCase.length(); queryIndex++) {
2123
            final char queryChar = queryLowerCase.charAt(queryIndex);
2124
2125
            boolean termCharacterMatchFound = false;
2126 4 1. getFuzzyDistance : changed conditional boundary → KILLED
2. getFuzzyDistance : Changed increment from 1 to -1 → KILLED
3. getFuzzyDistance : negated conditional → KILLED
4. getFuzzyDistance : negated conditional → KILLED
            for (; termIndex < termLowerCase.length() && !termCharacterMatchFound; termIndex++) {
2127
                final char termChar = termLowerCase.charAt(termIndex);
2128
2129 1 1. getFuzzyDistance : negated conditional → KILLED
                if (queryChar == termChar) {
2130
                    // simple character matches result in one point
2131 1 1. getFuzzyDistance : Changed increment from 1 to -1 → KILLED
                    score++;
2132
2133
                    // subsequent character matches further improve
2134
                    // the score.
2135 2 1. getFuzzyDistance : Replaced integer addition with subtraction → KILLED
2. getFuzzyDistance : negated conditional → KILLED
                    if (previousMatchingCharacterIndex + 1 == termIndex) {
2136 1 1. getFuzzyDistance : Changed increment from 2 to -2 → KILLED
                        score += 2;
2137
                    }
2138
2139
                    previousMatchingCharacterIndex = termIndex;
2140
2141
                    // we can leave the nested loop. Every character in the
2142
                    // query can match at most one character in the term.
2143
                    termCharacterMatchFound = true;
2144
                }
2145
            }
2146
        }
2147
2148 1 1. getFuzzyDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return score;
2149
    }
2150
2151
    /**
2152
     * <p>Find the Jaro Winkler Distance which indicates the similarity score between two Strings.</p>
2153
     *
2154
     * <p>The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters.
2155
     * Winkler increased this measure for matching initial characters.</p>
2156
     *
2157
     * <p>This implementation is based on the Jaro Winkler similarity algorithm
2158
     * from <a href="http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance</a>.</p>
2159
     *
2160
     * <pre>
2161
     * StringUtils.getJaroWinklerDistance(null, null)          = IllegalArgumentException
2162
     * StringUtils.getJaroWinklerDistance("", "")              = 0.0
2163
     * StringUtils.getJaroWinklerDistance("", "a")             = 0.0
2164
     * StringUtils.getJaroWinklerDistance("aaapppp", "")       = 0.0
2165
     * StringUtils.getJaroWinklerDistance("frog", "fog")       = 0.93
2166
     * StringUtils.getJaroWinklerDistance("fly", "ant")        = 0.0
2167
     * StringUtils.getJaroWinklerDistance("elephant", "hippo") = 0.44
2168
     * StringUtils.getJaroWinklerDistance("hippo", "elephant") = 0.44
2169
     * StringUtils.getJaroWinklerDistance("hippo", "zzzzzzzz") = 0.0
2170
     * StringUtils.getJaroWinklerDistance("hello", "hallo")    = 0.88
2171
     * StringUtils.getJaroWinklerDistance("ABC Corporation", "ABC Corp") = 0.93
2172
     * StringUtils.getJaroWinklerDistance("D N H Enterprises Inc", "D &amp; H Enterprises, Inc.") = 0.95
2173
     * StringUtils.getJaroWinklerDistance("My Gym Children's Fitness Center", "My Gym. Childrens Fitness") = 0.92
2174
     * StringUtils.getJaroWinklerDistance("PENNSYLVANIA", "PENNCISYLVNIA") = 0.88
2175
     * </pre>
2176
     *
2177
     * @param first the first String, must not be null
2178
     * @param second the second String, must not be null
2179
     * @return result distance
2180
     * @throws IllegalArgumentException if either String input {@code null}
2181
     * @since 3.3
2182
     * @deprecated as of 3.6, use commons-text
2183
     * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/similarity/JaroWinklerDistance.html">
2184
     * JaroWinklerDistance</a> instead
2185
     */
2186
    @Deprecated
2187
    public static double getJaroWinklerDistance(final CharSequence first, final CharSequence second) {
2188
        final double DEFAULT_SCALING_FACTOR = 0.1;
2189
2190 2 1. getJaroWinklerDistance : negated conditional → KILLED
2. getJaroWinklerDistance : negated conditional → KILLED
        if (first == null || second == null) {
2191
            throw new IllegalArgumentException("Strings must not be null");
2192
        }
2193
2194
        final int[] mtp = matches(first, second);
2195
        final double m = mtp[0];
2196 1 1. getJaroWinklerDistance : negated conditional → KILLED
        if (m == 0) {
2197 1 1. getJaroWinklerDistance : replaced return of double value with -(x + 1) for org/apache/commons/lang3/StringUtils::getJaroWinklerDistance → KILLED
            return 0D;
2198
        }
2199 7 1. getJaroWinklerDistance : Replaced double division with multiplication → KILLED
2. getJaroWinklerDistance : Replaced double division with multiplication → KILLED
3. getJaroWinklerDistance : Replaced double addition with subtraction → KILLED
4. getJaroWinklerDistance : Replaced double subtraction with addition → KILLED
5. getJaroWinklerDistance : Replaced double division with multiplication → KILLED
6. getJaroWinklerDistance : Replaced double addition with subtraction → KILLED
7. getJaroWinklerDistance : Replaced double division with multiplication → KILLED
        final double j = ((m / first.length() + m / second.length() + (m - mtp[1]) / m)) / 3;
2200 7 1. getJaroWinklerDistance : changed conditional boundary → SURVIVED
2. getJaroWinklerDistance : Replaced double division with multiplication → KILLED
3. getJaroWinklerDistance : Replaced double multiplication with division → KILLED
4. getJaroWinklerDistance : Replaced double subtraction with addition → KILLED
5. getJaroWinklerDistance : Replaced double multiplication with division → KILLED
6. getJaroWinklerDistance : Replaced double addition with subtraction → KILLED
7. getJaroWinklerDistance : negated conditional → KILLED
        final double jw = j < 0.7D ? j : j + Math.min(DEFAULT_SCALING_FACTOR, 1D / mtp[3]) * mtp[2] * (1D - j);
2201 3 1. getJaroWinklerDistance : Replaced double multiplication with division → KILLED
2. getJaroWinklerDistance : Replaced double division with multiplication → KILLED
3. getJaroWinklerDistance : replaced return of double value with -(x + 1) for org/apache/commons/lang3/StringUtils::getJaroWinklerDistance → KILLED
        return Math.round(jw * 100.0D) / 100.0D;
2202
    }
2203
2204
    // Misc
2205
    //-----------------------------------------------------------------------
2206
    /**
2207
     * <p>Find the Levenshtein distance between two Strings.</p>
2208
     *
2209
     * <p>This is the number of changes needed to change one String into
2210
     * another, where each change is a single character modification (deletion,
2211
     * insertion or substitution).</p>
2212
     *
2213
     * <p>The implementation uses a single-dimensional array of length s.length() + 1. See
2214
     * <a href="http://blog.softwx.net/2014/12/optimizing-levenshtein-algorithm-in-c.html">
2215
     * http://blog.softwx.net/2014/12/optimizing-levenshtein-algorithm-in-c.html</a> for details.</p>
2216
     *
2217
     * <pre>
2218
     * StringUtils.getLevenshteinDistance(null, *)             = IllegalArgumentException
2219
     * StringUtils.getLevenshteinDistance(*, null)             = IllegalArgumentException
2220
     * StringUtils.getLevenshteinDistance("", "")              = 0
2221
     * StringUtils.getLevenshteinDistance("", "a")             = 1
2222
     * StringUtils.getLevenshteinDistance("aaapppp", "")       = 7
2223
     * StringUtils.getLevenshteinDistance("frog", "fog")       = 1
2224
     * StringUtils.getLevenshteinDistance("fly", "ant")        = 3
2225
     * StringUtils.getLevenshteinDistance("elephant", "hippo") = 7
2226
     * StringUtils.getLevenshteinDistance("hippo", "elephant") = 7
2227
     * StringUtils.getLevenshteinDistance("hippo", "zzzzzzzz") = 8
2228
     * StringUtils.getLevenshteinDistance("hello", "hallo")    = 1
2229
     * </pre>
2230
     *
2231
     * @param s  the first String, must not be null
2232
     * @param t  the second String, must not be null
2233
     * @return result distance
2234
     * @throws IllegalArgumentException if either String input {@code null}
2235
     * @since 3.0 Changed signature from getLevenshteinDistance(String, String) to
2236
     * getLevenshteinDistance(CharSequence, CharSequence)
2237
     * @deprecated as of 3.6, use commons-text
2238
     * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/similarity/LevenshteinDistance.html">
2239
     * LevenshteinDistance</a> instead
2240
     */
2241
    @Deprecated
2242
    public static int getLevenshteinDistance(CharSequence s, CharSequence t) {
2243 2 1. getLevenshteinDistance : negated conditional → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
        if (s == null || t == null) {
2244
            throw new IllegalArgumentException("Strings must not be null");
2245
        }
2246
2247
        int n = s.length();
2248
        int m = t.length();
2249
2250 1 1. getLevenshteinDistance : negated conditional → KILLED
        if (n == 0) {
2251 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return m;
2252 1 1. getLevenshteinDistance : negated conditional → KILLED
        } else if (m == 0) {
2253 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return n;
2254
        }
2255
2256 2 1. getLevenshteinDistance : changed conditional boundary → SURVIVED
2. getLevenshteinDistance : negated conditional → SURVIVED
        if (n > m) {
2257
            // swap the input strings to consume less memory
2258
            final CharSequence tmp = s;
2259
            s = t;
2260
            t = tmp;
2261
            n = m;
2262
            m = t.length();
2263
        }
2264
2265 1 1. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
        final int p[] = new int[n + 1];
2266
        // indexes into strings s and t
2267
        int i; // iterates through s
2268
        int j; // iterates through t
2269
        int upper_left;
2270
        int upper;
2271
2272
        char t_j; // jth character of t
2273
        int cost;
2274
2275 3 1. getLevenshteinDistance : changed conditional boundary → SURVIVED
2. getLevenshteinDistance : negated conditional → SURVIVED
3. getLevenshteinDistance : Changed increment from 1 to -1 → KILLED
        for (i = 0; i <= n; i++) {
2276
            p[i] = i;
2277
        }
2278
2279 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : Changed increment from 1 to -1 → KILLED
3. getLevenshteinDistance : negated conditional → KILLED
        for (j = 1; j <= m; j++) {
2280
            upper_left = p[0];
2281 1 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
            t_j = t.charAt(j - 1);
2282
            p[0] = j;
2283
2284 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : Changed increment from 1 to -1 → KILLED
3. getLevenshteinDistance : negated conditional → KILLED
            for (i = 1; i <= n; i++) {
2285
                upper = p[i];
2286 2 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
                cost = s.charAt(i - 1) == t_j ? 0 : 1;
2287
                // minimum of cell to the left+1, to the top+1, diagonally left and up +cost
2288 4 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
2. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
3. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
4. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
                p[i] = Math.min(Math.min(p[i - 1] + 1, p[i] + 1), upper_left + cost);
2289
                upper_left = upper;
2290
            }
2291
        }
2292
2293 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return p[n];
2294
    }
2295
2296
    /**
2297
     * <p>Find the Levenshtein distance between two Strings if it's less than or equal to a given
2298
     * threshold.</p>
2299
     *
2300
     * <p>This is the number of changes needed to change one String into
2301
     * another, where each change is a single character modification (deletion,
2302
     * insertion or substitution).</p>
2303
     *
2304
     * <p>This implementation follows from Algorithms on Strings, Trees and Sequences by Dan Gusfield
2305
     * and Chas Emerick's implementation of the Levenshtein distance algorithm from
2306
     * <a href="http://www.merriampark.com/ld.htm">http://www.merriampark.com/ld.htm</a></p>
2307
     *
2308
     * <pre>
2309
     * StringUtils.getLevenshteinDistance(null, *, *)             = IllegalArgumentException
2310
     * StringUtils.getLevenshteinDistance(*, null, *)             = IllegalArgumentException
2311
     * StringUtils.getLevenshteinDistance(*, *, -1)               = IllegalArgumentException
2312
     * StringUtils.getLevenshteinDistance("", "", 0)              = 0
2313
     * StringUtils.getLevenshteinDistance("aaapppp", "", 8)       = 7
2314
     * StringUtils.getLevenshteinDistance("aaapppp", "", 7)       = 7
2315
     * StringUtils.getLevenshteinDistance("aaapppp", "", 6))      = -1
2316
     * StringUtils.getLevenshteinDistance("elephant", "hippo", 7) = 7
2317
     * StringUtils.getLevenshteinDistance("elephant", "hippo", 6) = -1
2318
     * StringUtils.getLevenshteinDistance("hippo", "elephant", 7) = 7
2319
     * StringUtils.getLevenshteinDistance("hippo", "elephant", 6) = -1
2320
     * </pre>
2321
     *
2322
     * @param s  the first String, must not be null
2323
     * @param t  the second String, must not be null
2324
     * @param threshold the target threshold, must not be negative
2325
     * @return result distance, or {@code -1} if the distance would be greater than the threshold
2326
     * @throws IllegalArgumentException if either String input {@code null} or negative threshold
2327
     * @deprecated as of 3.6, use commons-text
2328
     * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/similarity/LevenshteinDistance.html">
2329
     * LevenshteinDistance</a> instead
2330
     */
2331
    @Deprecated
2332
    public static int getLevenshteinDistance(CharSequence s, CharSequence t, final int threshold) {
2333 2 1. getLevenshteinDistance : negated conditional → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
        if (s == null || t == null) {
2334
            throw new IllegalArgumentException("Strings must not be null");
2335
        }
2336 2 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
        if (threshold < 0) {
2337
            throw new IllegalArgumentException("Threshold must not be negative");
2338
        }
2339
2340
        /*
2341
        This implementation only computes the distance if it's less than or equal to the
2342
        threshold value, returning -1 if it's greater.  The advantage is performance: unbounded
2343
        distance is O(nm), but a bound of k allows us to reduce it to O(km) time by only
2344
        computing a diagonal stripe of width 2k + 1 of the cost table.
2345
        It is also possible to use this to compute the unbounded Levenshtein distance by starting
2346
        the threshold at 1 and doubling each time until the distance is found; this is O(dm), where
2347
        d is the distance.
2348
2349
        One subtlety comes from needing to ignore entries on the border of our stripe
2350
        eg.
2351
        p[] = |#|#|#|*
2352
        d[] =  *|#|#|#|
2353
        We must ignore the entry to the left of the leftmost member
2354
        We must ignore the entry above the rightmost member
2355
2356
        Another subtlety comes from our stripe running off the matrix if the strings aren't
2357
        of the same size.  Since string s is always swapped to be the shorter of the two,
2358
        the stripe will always run off to the upper right instead of the lower left of the matrix.
2359
2360
        As a concrete example, suppose s is of length 5, t is of length 7, and our threshold is 1.
2361
        In this case we're going to walk a stripe of length 3.  The matrix would look like so:
2362
2363
           1 2 3 4 5
2364
        1 |#|#| | | |
2365
        2 |#|#|#| | |
2366
        3 | |#|#|#| |
2367
        4 | | |#|#|#|
2368
        5 | | | |#|#|
2369
        6 | | | | |#|
2370
        7 | | | | | |
2371
2372
        Note how the stripe leads off the table as there is no possible way to turn a string of length 5
2373
        into one of length 7 in edit distance of 1.
2374
2375
        Additionally, this implementation decreases memory usage by using two
2376
        single-dimensional arrays and swapping them back and forth instead of allocating
2377
        an entire n by m matrix.  This requires a few minor changes, such as immediately returning
2378
        when it's detected that the stripe has run off the matrix and initially filling the arrays with
2379
        large values so that entries we don't compute are ignored.
2380
2381
        See Algorithms on Strings, Trees and Sequences by Dan Gusfield for some discussion.
2382
         */
2383
2384
        int n = s.length(); // length of s
2385
        int m = t.length(); // length of t
2386
2387
        // if one string is empty, the edit distance is necessarily the length of the other
2388 1 1. getLevenshteinDistance : negated conditional → KILLED
        if (n == 0) {
2389 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
3. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return m <= threshold ? m : -1;
2390 1 1. getLevenshteinDistance : negated conditional → KILLED
        } else if (m == 0) {
2391 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
3. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return n <= threshold ? n : -1;
2392 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
3. getLevenshteinDistance : negated conditional → KILLED
        } else if (Math.abs(n - m) > threshold) {
2393
            // no need to calculate the distance if the length difference is greater than the threshold
2394 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return -1;
2395
        }
2396
2397 2 1. getLevenshteinDistance : changed conditional boundary → SURVIVED
2. getLevenshteinDistance : negated conditional → SURVIVED
        if (n > m) {
2398
            // swap the two strings to consume less memory
2399
            final CharSequence tmp = s;
2400
            s = t;
2401
            t = tmp;
2402
            n = m;
2403
            m = t.length();
2404
        }
2405
2406 1 1. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
        int p[] = new int[n + 1]; // 'previous' cost array, horizontally
2407 1 1. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
        int d[] = new int[n + 1]; // cost array, horizontally
2408
        int _d[]; // placeholder to assist in swapping p and d
2409
2410
        // fill in starting table values
2411 1 1. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
        final int boundary = Math.min(n, threshold) + 1;
2412 3 1. getLevenshteinDistance : negated conditional → SURVIVED
2. getLevenshteinDistance : changed conditional boundary → KILLED
3. getLevenshteinDistance : Changed increment from 1 to -1 → KILLED
        for (int i = 0; i < boundary; i++) {
2413
            p[i] = i;
2414
        }
2415
        // these fills ensure that the value above the rightmost entry of our
2416
        // stripe will be ignored in following loop iterations
2417 1 1. getLevenshteinDistance : removed call to java/util/Arrays::fill → SURVIVED
        Arrays.fill(p, boundary, p.length, Integer.MAX_VALUE);
2418 1 1. getLevenshteinDistance : removed call to java/util/Arrays::fill → SURVIVED
        Arrays.fill(d, Integer.MAX_VALUE);
2419
2420
        // iterates through t
2421 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : Changed increment from 1 to -1 → KILLED
3. getLevenshteinDistance : negated conditional → KILLED
        for (int j = 1; j <= m; j++) {
2422 1 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
            final char t_j = t.charAt(j - 1); // jth character of t
2423
            d[0] = j;
2424
2425
            // compute stripe indices, constrain to array size
2426 1 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
            final int min = Math.max(1, j - threshold);
2427 4 1. getLevenshteinDistance : changed conditional boundary → SURVIVED
2. getLevenshteinDistance : Replaced integer subtraction with addition → SURVIVED
3. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
4. getLevenshteinDistance : negated conditional → KILLED
            final int max = j > Integer.MAX_VALUE - threshold ? n : Math.min(n, j + threshold);
2428
2429
            // the stripe may lead off of the table if s and t are of different sizes
2430 2 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
            if (min > max) {
2431 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return -1;
2432
            }
2433
2434
            // ignore entry left of leftmost
2435 2 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
            if (min > 1) {
2436 1 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
                d[min - 1] = Integer.MAX_VALUE;
2437
            }
2438
2439
            // iterates through [min, max] in s
2440 3 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : Changed increment from 1 to -1 → KILLED
3. getLevenshteinDistance : negated conditional → KILLED
            for (int i = min; i <= max; i++) {
2441 2 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
                if (s.charAt(i - 1) == t_j) {
2442
                    // diagonally left and up
2443 1 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
                    d[i] = p[i - 1];
2444
                } else {
2445
                    // 1 + minimum of cell to the left, to the top, diagonally left and up
2446 3 1. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
2. getLevenshteinDistance : Replaced integer subtraction with addition → KILLED
3. getLevenshteinDistance : Replaced integer addition with subtraction → KILLED
                    d[i] = 1 + Math.min(Math.min(d[i - 1], p[i]), p[i - 1]);
2447
                }
2448
            }
2449
2450
            // copy current distance counts to 'previous row' distance counts
2451
            _d = p;
2452
            p = d;
2453
            d = _d;
2454
        }
2455
2456
        // if p[n] is greater than the threshold, there's no guarantee on it being the correct
2457
        // distance
2458 2 1. getLevenshteinDistance : changed conditional boundary → KILLED
2. getLevenshteinDistance : negated conditional → KILLED
        if (p[n] <= threshold) {
2459 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return p[n];
2460
        }
2461 1 1. getLevenshteinDistance : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return -1;
2462
    }
2463
2464
    /**
2465
     * <p>Finds the first index within a CharSequence, handling {@code null}.
2466
     * This method uses {@link String#indexOf(String, int)} if possible.</p>
2467
     *
2468
     * <p>A {@code null} CharSequence will return {@code -1}.</p>
2469
     *
2470
     * <pre>
2471
     * StringUtils.indexOf(null, *)          = -1
2472
     * StringUtils.indexOf(*, null)          = -1
2473
     * StringUtils.indexOf("", "")           = 0
2474
     * StringUtils.indexOf("", *)            = -1 (except when * = "")
2475
     * StringUtils.indexOf("aabaabaa", "a")  = 0
2476
     * StringUtils.indexOf("aabaabaa", "b")  = 2
2477
     * StringUtils.indexOf("aabaabaa", "ab") = 1
2478
     * StringUtils.indexOf("aabaabaa", "")   = 0
2479
     * </pre>
2480
     *
2481
     * @param seq  the CharSequence to check, may be null
2482
     * @param searchSeq  the CharSequence to find, may be null
2483
     * @return the first index of the search CharSequence,
2484
     *  -1 if no match or {@code null} string input
2485
     * @since 2.0
2486
     * @since 3.0 Changed signature from indexOf(String, String) to indexOf(CharSequence, CharSequence)
2487
     */
2488
    public static int indexOf(final CharSequence seq, final CharSequence searchSeq) {
2489 2 1. indexOf : negated conditional → KILLED
2. indexOf : negated conditional → KILLED
        if (seq == null || searchSeq == null) {
2490 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2491
        }
2492 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.indexOf(seq, searchSeq, 0);
2493
    }
2494
2495
    /**
2496
     * <p>Finds the first index within a CharSequence, handling {@code null}.
2497
     * This method uses {@link String#indexOf(String, int)} if possible.</p>
2498
     *
2499
     * <p>A {@code null} CharSequence will return {@code -1}.
2500
     * A negative start position is treated as zero.
2501
     * An empty ("") search CharSequence always matches.
2502
     * A start position greater than the string length only matches
2503
     * an empty search CharSequence.</p>
2504
     *
2505
     * <pre>
2506
     * StringUtils.indexOf(null, *, *)          = -1
2507
     * StringUtils.indexOf(*, null, *)          = -1
2508
     * StringUtils.indexOf("", "", 0)           = 0
2509
     * StringUtils.indexOf("", *, 0)            = -1 (except when * = "")
2510
     * StringUtils.indexOf("aabaabaa", "a", 0)  = 0
2511
     * StringUtils.indexOf("aabaabaa", "b", 0)  = 2
2512
     * StringUtils.indexOf("aabaabaa", "ab", 0) = 1
2513
     * StringUtils.indexOf("aabaabaa", "b", 3)  = 5
2514
     * StringUtils.indexOf("aabaabaa", "b", 9)  = -1
2515
     * StringUtils.indexOf("aabaabaa", "b", -1) = 2
2516
     * StringUtils.indexOf("aabaabaa", "", 2)   = 2
2517
     * StringUtils.indexOf("abc", "", 9)        = 3
2518
     * </pre>
2519
     *
2520
     * @param seq  the CharSequence to check, may be null
2521
     * @param searchSeq  the CharSequence to find, may be null
2522
     * @param startPos  the start position, negative treated as zero
2523
     * @return the first index of the search CharSequence (always &ge; startPos),
2524
     *  -1 if no match or {@code null} string input
2525
     * @since 2.0
2526
     * @since 3.0 Changed signature from indexOf(String, String, int) to indexOf(CharSequence, CharSequence, int)
2527
     */
2528
    public static int indexOf(final CharSequence seq, final CharSequence searchSeq, final int startPos) {
2529 2 1. indexOf : negated conditional → KILLED
2. indexOf : negated conditional → KILLED
        if (seq == null || searchSeq == null) {
2530 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2531
        }
2532 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.indexOf(seq, searchSeq, startPos);
2533
    }
2534
2535
    // IndexOf
2536
    //-----------------------------------------------------------------------
2537
    /**
2538
     * Returns the index within <code>seq</code> of the first occurrence of
2539
     * the specified character. If a character with value
2540
     * <code>searchChar</code> occurs in the character sequence represented by
2541
     * <code>seq</code> <code>CharSequence</code> object, then the index (in Unicode
2542
     * code units) of the first such occurrence is returned. For
2543
     * values of <code>searchChar</code> in the range from 0 to 0xFFFF
2544
     * (inclusive), this is the smallest value <i>k</i> such that:
2545
     * <blockquote><pre>
2546
     * this.charAt(<i>k</i>) == searchChar
2547
     * </pre></blockquote>
2548
     * is true. For other values of <code>searchChar</code>, it is the
2549
     * smallest value <i>k</i> such that:
2550
     * <blockquote><pre>
2551
     * this.codePointAt(<i>k</i>) == searchChar
2552
     * </pre></blockquote>
2553
     * is true. In either case, if no such character occurs in <code>seq</code>,
2554
     * then {@code INDEX_NOT_FOUND (-1)} is returned.
2555
     *
2556
     * <p>Furthermore, a {@code null} or empty ("") CharSequence will
2557
     * return {@code INDEX_NOT_FOUND (-1)}.</p>
2558
     *
2559
     * <pre>
2560
     * StringUtils.indexOf(null, *)         = -1
2561
     * StringUtils.indexOf("", *)           = -1
2562
     * StringUtils.indexOf("aabaabaa", 'a') = 0
2563
     * StringUtils.indexOf("aabaabaa", 'b') = 2
2564
     * </pre>
2565
     *
2566
     * @param seq  the CharSequence to check, may be null
2567
     * @param searchChar  the character to find
2568
     * @return the first index of the search character,
2569
     *  -1 if no match or {@code null} string input
2570
     * @since 2.0
2571
     * @since 3.0 Changed signature from indexOf(String, int) to indexOf(CharSequence, int)
2572
     * @since 3.6 Updated {@link CharSequenceUtils} call to behave more like <code>String</code>
2573
     */
2574
    public static int indexOf(final CharSequence seq, final int searchChar) {
2575 1 1. indexOf : negated conditional → KILLED
        if (isEmpty(seq)) {
2576 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2577
        }
2578 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.indexOf(seq, searchChar, 0);
2579
    }
2580
2581
    /**
2582
     *
2583
     * Returns the index within <code>seq</code> of the first occurrence of the
2584
     * specified character, starting the search at the specified index.
2585
     * <p>
2586
     * If a character with value <code>searchChar</code> occurs in the
2587
     * character sequence represented by the <code>seq</code> <code>CharSequence</code>
2588
     * object at an index no smaller than <code>startPos</code>, then
2589
     * the index of the first such occurrence is returned. For values
2590
     * of <code>searchChar</code> in the range from 0 to 0xFFFF (inclusive),
2591
     * this is the smallest value <i>k</i> such that:
2592
     * <blockquote><pre>
2593
     * (this.charAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &gt;= startPos)
2594
     * </pre></blockquote>
2595
     * is true. For other values of <code>searchChar</code>, it is the
2596
     * smallest value <i>k</i> such that:
2597
     * <blockquote><pre>
2598
     * (this.codePointAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &gt;= startPos)
2599
     * </pre></blockquote>
2600
     * is true. In either case, if no such character occurs in <code>seq</code>
2601
     * at or after position <code>startPos</code>, then
2602
     * <code>-1</code> is returned.
2603
     *
2604
     * <p>
2605
     * There is no restriction on the value of <code>startPos</code>. If it
2606
     * is negative, it has the same effect as if it were zero: this entire
2607
     * string may be searched. If it is greater than the length of this
2608
     * string, it has the same effect as if it were equal to the length of
2609
     * this string: {@code (INDEX_NOT_FOUND) -1} is returned. Furthermore, a
2610
     * {@code null} or empty ("") CharSequence will
2611
     * return {@code (INDEX_NOT_FOUND) -1}.
2612
     *
2613
     * <p>All indices are specified in <code>char</code> values
2614
     * (Unicode code units).
2615
     *
2616
     * <pre>
2617
     * StringUtils.indexOf(null, *, *)          = -1
2618
     * StringUtils.indexOf("", *, *)            = -1
2619
     * StringUtils.indexOf("aabaabaa", 'b', 0)  = 2
2620
     * StringUtils.indexOf("aabaabaa", 'b', 3)  = 5
2621
     * StringUtils.indexOf("aabaabaa", 'b', 9)  = -1
2622
     * StringUtils.indexOf("aabaabaa", 'b', -1) = 2
2623
     * </pre>
2624
     *
2625
     * @param seq  the CharSequence to check, may be null
2626
     * @param searchChar  the character to find
2627
     * @param startPos  the start position, negative treated as zero
2628
     * @return the first index of the search character (always &ge; startPos),
2629
     *  -1 if no match or {@code null} string input
2630
     * @since 2.0
2631
     * @since 3.0 Changed signature from indexOf(String, int, int) to indexOf(CharSequence, int, int)
2632
     * @since 3.6 Updated {@link CharSequenceUtils} call to behave more like <code>String</code>
2633
     */
2634
    public static int indexOf(final CharSequence seq, final int searchChar, final int startPos) {
2635 1 1. indexOf : negated conditional → KILLED
        if (isEmpty(seq)) {
2636 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2637
        }
2638 1 1. indexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.indexOf(seq, searchChar, startPos);
2639
    }
2640
2641
    // IndexOfAny chars
2642
    //-----------------------------------------------------------------------
2643
    /**
2644
     * <p>Search a CharSequence to find the first index of any
2645
     * character in the given set of characters.</p>
2646
     *
2647
     * <p>A {@code null} String will return {@code -1}.
2648
     * A {@code null} or zero length search array will return {@code -1}.</p>
2649
     *
2650
     * <pre>
2651
     * StringUtils.indexOfAny(null, *)                  = -1
2652
     * StringUtils.indexOfAny("", *)                    = -1
2653
     * StringUtils.indexOfAny(*, null)                  = -1
2654
     * StringUtils.indexOfAny(*, [])                    = -1
2655
     * StringUtils.indexOfAny("zzabyycdxx", ['z', 'a']) = 0
2656
     * StringUtils.indexOfAny("zzabyycdxx", ['b', 'y']) = 3
2657
     * StringUtils.indexOfAny("aba", ['z'])             = -1
2658
     * </pre>
2659
     *
2660
     * @param cs  the CharSequence to check, may be null
2661
     * @param searchChars  the chars to search for, may be null
2662
     * @return the index of any of the chars, -1 if no match or null input
2663
     * @since 2.0
2664
     * @since 3.0 Changed signature from indexOfAny(String, char[]) to indexOfAny(CharSequence, char...)
2665
     */
2666
    public static int indexOfAny(final CharSequence cs, final char... searchChars) {
2667 2 1. indexOfAny : negated conditional → KILLED
2. indexOfAny : negated conditional → KILLED
        if (isEmpty(cs) || ArrayUtils.isEmpty(searchChars)) {
2668 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2669
        }
2670
        final int csLen = cs.length();
2671 1 1. indexOfAny : Replaced integer subtraction with addition → SURVIVED
        final int csLast = csLen - 1;
2672
        final int searchLen = searchChars.length;
2673 1 1. indexOfAny : Replaced integer subtraction with addition → SURVIVED
        final int searchLast = searchLen - 1;
2674 3 1. indexOfAny : changed conditional boundary → KILLED
2. indexOfAny : Changed increment from 1 to -1 → KILLED
3. indexOfAny : negated conditional → KILLED
        for (int i = 0; i < csLen; i++) {
2675
            final char ch = cs.charAt(i);
2676 3 1. indexOfAny : changed conditional boundary → KILLED
2. indexOfAny : Changed increment from 1 to -1 → KILLED
3. indexOfAny : negated conditional → KILLED
            for (int j = 0; j < searchLen; j++) {
2677 1 1. indexOfAny : negated conditional → KILLED
                if (searchChars[j] == ch) {
2678 5 1. indexOfAny : changed conditional boundary → SURVIVED
2. indexOfAny : changed conditional boundary → SURVIVED
3. indexOfAny : negated conditional → KILLED
4. indexOfAny : negated conditional → KILLED
5. indexOfAny : negated conditional → KILLED
                    if (i < csLast && j < searchLast && Character.isHighSurrogate(ch)) {
2679
                        // ch is a supplementary character
2680 3 1. indexOfAny : Replaced integer addition with subtraction → KILLED
2. indexOfAny : Replaced integer addition with subtraction → KILLED
3. indexOfAny : negated conditional → KILLED
                        if (searchChars[j + 1] == cs.charAt(i + 1)) {
2681 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                            return i;
2682
                        }
2683
                    } else {
2684 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                        return i;
2685
                    }
2686
                }
2687
            }
2688
        }
2689 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return INDEX_NOT_FOUND;
2690
    }
2691
2692
    // IndexOfAny strings
2693
    //-----------------------------------------------------------------------
2694
    /**
2695
     * <p>Find the first index of any of a set of potential substrings.</p>
2696
     *
2697
     * <p>A {@code null} CharSequence will return {@code -1}.
2698
     * A {@code null} or zero length search array will return {@code -1}.
2699
     * A {@code null} search array entry will be ignored, but a search
2700
     * array containing "" will return {@code 0} if {@code str} is not
2701
     * null. This method uses {@link String#indexOf(String)} if possible.</p>
2702
     *
2703
     * <pre>
2704
     * StringUtils.indexOfAny(null, *)                      = -1
2705
     * StringUtils.indexOfAny(*, null)                      = -1
2706
     * StringUtils.indexOfAny(*, [])                        = -1
2707
     * StringUtils.indexOfAny("zzabyycdxx", ["ab", "cd"])   = 2
2708
     * StringUtils.indexOfAny("zzabyycdxx", ["cd", "ab"])   = 2
2709
     * StringUtils.indexOfAny("zzabyycdxx", ["mn", "op"])   = -1
2710
     * StringUtils.indexOfAny("zzabyycdxx", ["zab", "aby"]) = 1
2711
     * StringUtils.indexOfAny("zzabyycdxx", [""])           = 0
2712
     * StringUtils.indexOfAny("", [""])                     = 0
2713
     * StringUtils.indexOfAny("", ["a"])                    = -1
2714
     * </pre>
2715
     *
2716
     * @param str  the CharSequence to check, may be null
2717
     * @param searchStrs  the CharSequences to search for, may be null
2718
     * @return the first index of any of the searchStrs in str, -1 if no match
2719
     * @since 3.0 Changed signature from indexOfAny(String, String[]) to indexOfAny(CharSequence, CharSequence...)
2720
     */
2721
    public static int indexOfAny(final CharSequence str, final CharSequence... searchStrs) {
2722 2 1. indexOfAny : negated conditional → KILLED
2. indexOfAny : negated conditional → KILLED
        if (str == null || searchStrs == null) {
2723 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2724
        }
2725
2726
        // String's can't have a MAX_VALUEth index.
2727
        int ret = Integer.MAX_VALUE;
2728
2729
        int tmp = 0;
2730
        for (final CharSequence search : searchStrs) {
2731 1 1. indexOfAny : negated conditional → KILLED
            if (search == null) {
2732
                continue;
2733
            }
2734
            tmp = CharSequenceUtils.indexOf(str, search, 0);
2735 1 1. indexOfAny : negated conditional → KILLED
            if (tmp == INDEX_NOT_FOUND) {
2736
                continue;
2737
            }
2738
2739 2 1. indexOfAny : changed conditional boundary → SURVIVED
2. indexOfAny : negated conditional → KILLED
            if (tmp < ret) {
2740
                ret = tmp;
2741
            }
2742
        }
2743
2744 2 1. indexOfAny : negated conditional → KILLED
2. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return ret == Integer.MAX_VALUE ? INDEX_NOT_FOUND : ret;
2745
    }
2746
2747
    /**
2748
     * <p>Search a CharSequence to find the first index of any
2749
     * character in the given set of characters.</p>
2750
     *
2751
     * <p>A {@code null} String will return {@code -1}.
2752
     * A {@code null} search string will return {@code -1}.</p>
2753
     *
2754
     * <pre>
2755
     * StringUtils.indexOfAny(null, *)            = -1
2756
     * StringUtils.indexOfAny("", *)              = -1
2757
     * StringUtils.indexOfAny(*, null)            = -1
2758
     * StringUtils.indexOfAny(*, "")              = -1
2759
     * StringUtils.indexOfAny("zzabyycdxx", "za") = 0
2760
     * StringUtils.indexOfAny("zzabyycdxx", "by") = 3
2761
     * StringUtils.indexOfAny("aba", "z")         = -1
2762
     * </pre>
2763
     *
2764
     * @param cs  the CharSequence to check, may be null
2765
     * @param searchChars  the chars to search for, may be null
2766
     * @return the index of any of the chars, -1 if no match or null input
2767
     * @since 2.0
2768
     * @since 3.0 Changed signature from indexOfAny(String, String) to indexOfAny(CharSequence, String)
2769
     */
2770
    public static int indexOfAny(final CharSequence cs, final String searchChars) {
2771 2 1. indexOfAny : negated conditional → KILLED
2. indexOfAny : negated conditional → KILLED
        if (isEmpty(cs) || isEmpty(searchChars)) {
2772 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2773
        }
2774 1 1. indexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return indexOfAny(cs, searchChars.toCharArray());
2775
    }
2776
2777
    // IndexOfAnyBut chars
2778
    //-----------------------------------------------------------------------
2779
    /**
2780
     * <p>Searches a CharSequence to find the first index of any
2781
     * character not in the given set of characters.</p>
2782
     *
2783
     * <p>A {@code null} CharSequence will return {@code -1}.
2784
     * A {@code null} or zero length search array will return {@code -1}.</p>
2785
     *
2786
     * <pre>
2787
     * StringUtils.indexOfAnyBut(null, *)                              = -1
2788
     * StringUtils.indexOfAnyBut("", *)                                = -1
2789
     * StringUtils.indexOfAnyBut(*, null)                              = -1
2790
     * StringUtils.indexOfAnyBut(*, [])                                = -1
2791
     * StringUtils.indexOfAnyBut("zzabyycdxx", new char[] {'z', 'a'} ) = 3
2792
     * StringUtils.indexOfAnyBut("aba", new char[] {'z'} )             = 0
2793
     * StringUtils.indexOfAnyBut("aba", new char[] {'a', 'b'} )        = -1
2794
2795
     * </pre>
2796
     *
2797
     * @param cs  the CharSequence to check, may be null
2798
     * @param searchChars  the chars to search for, may be null
2799
     * @return the index of any of the chars, -1 if no match or null input
2800
     * @since 2.0
2801
     * @since 3.0 Changed signature from indexOfAnyBut(String, char[]) to indexOfAnyBut(CharSequence, char...)
2802
     */
2803
    public static int indexOfAnyBut(final CharSequence cs, final char... searchChars) {
2804 2 1. indexOfAnyBut : negated conditional → KILLED
2. indexOfAnyBut : negated conditional → KILLED
        if (isEmpty(cs) || ArrayUtils.isEmpty(searchChars)) {
2805 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2806
        }
2807
        final int csLen = cs.length();
2808 1 1. indexOfAnyBut : Replaced integer subtraction with addition → SURVIVED
        final int csLast = csLen - 1;
2809
        final int searchLen = searchChars.length;
2810 1 1. indexOfAnyBut : Replaced integer subtraction with addition → SURVIVED
        final int searchLast = searchLen - 1;
2811
        outer:
2812 3 1. indexOfAnyBut : changed conditional boundary → KILLED
2. indexOfAnyBut : Changed increment from 1 to -1 → KILLED
3. indexOfAnyBut : negated conditional → KILLED
        for (int i = 0; i < csLen; i++) {
2813
            final char ch = cs.charAt(i);
2814 3 1. indexOfAnyBut : changed conditional boundary → KILLED
2. indexOfAnyBut : Changed increment from 1 to -1 → KILLED
3. indexOfAnyBut : negated conditional → KILLED
            for (int j = 0; j < searchLen; j++) {
2815 1 1. indexOfAnyBut : negated conditional → KILLED
                if (searchChars[j] == ch) {
2816 5 1. indexOfAnyBut : changed conditional boundary → SURVIVED
2. indexOfAnyBut : changed conditional boundary → SURVIVED
3. indexOfAnyBut : negated conditional → KILLED
4. indexOfAnyBut : negated conditional → KILLED
5. indexOfAnyBut : negated conditional → KILLED
                    if (i < csLast && j < searchLast && Character.isHighSurrogate(ch)) {
2817 3 1. indexOfAnyBut : Replaced integer addition with subtraction → KILLED
2. indexOfAnyBut : Replaced integer addition with subtraction → KILLED
3. indexOfAnyBut : negated conditional → KILLED
                        if (searchChars[j + 1] == cs.charAt(i + 1)) {
2818
                            continue outer;
2819
                        }
2820
                    } else {
2821
                        continue outer;
2822
                    }
2823
                }
2824
            }
2825 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return i;
2826
        }
2827 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return INDEX_NOT_FOUND;
2828
    }
2829
2830
    /**
2831
     * <p>Search a CharSequence to find the first index of any
2832
     * character not in the given set of characters.</p>
2833
     *
2834
     * <p>A {@code null} CharSequence will return {@code -1}.
2835
     * A {@code null} or empty search string will return {@code -1}.</p>
2836
     *
2837
     * <pre>
2838
     * StringUtils.indexOfAnyBut(null, *)            = -1
2839
     * StringUtils.indexOfAnyBut("", *)              = -1
2840
     * StringUtils.indexOfAnyBut(*, null)            = -1
2841
     * StringUtils.indexOfAnyBut(*, "")              = -1
2842
     * StringUtils.indexOfAnyBut("zzabyycdxx", "za") = 3
2843
     * StringUtils.indexOfAnyBut("zzabyycdxx", "")   = -1
2844
     * StringUtils.indexOfAnyBut("aba", "ab")        = -1
2845
     * </pre>
2846
     *
2847
     * @param seq  the CharSequence to check, may be null
2848
     * @param searchChars  the chars to search for, may be null
2849
     * @return the index of any of the chars, -1 if no match or null input
2850
     * @since 2.0
2851
     * @since 3.0 Changed signature from indexOfAnyBut(String, String) to indexOfAnyBut(CharSequence, CharSequence)
2852
     */
2853
    public static int indexOfAnyBut(final CharSequence seq, final CharSequence searchChars) {
2854 2 1. indexOfAnyBut : negated conditional → KILLED
2. indexOfAnyBut : negated conditional → KILLED
        if (isEmpty(seq) || isEmpty(searchChars)) {
2855 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2856
        }
2857
        final int strLen = seq.length();
2858 3 1. indexOfAnyBut : changed conditional boundary → KILLED
2. indexOfAnyBut : Changed increment from 1 to -1 → KILLED
3. indexOfAnyBut : negated conditional → KILLED
        for (int i = 0; i < strLen; i++) {
2859
            final char ch = seq.charAt(i);
2860 2 1. indexOfAnyBut : changed conditional boundary → KILLED
2. indexOfAnyBut : negated conditional → KILLED
            final boolean chFound = CharSequenceUtils.indexOf(searchChars, ch, 0) >= 0;
2861 4 1. indexOfAnyBut : changed conditional boundary → SURVIVED
2. indexOfAnyBut : Replaced integer addition with subtraction → SURVIVED
3. indexOfAnyBut : negated conditional → KILLED
4. indexOfAnyBut : negated conditional → KILLED
            if (i + 1 < strLen && Character.isHighSurrogate(ch)) {
2862 1 1. indexOfAnyBut : Replaced integer addition with subtraction → KILLED
                final char ch2 = seq.charAt(i + 1);
2863 3 1. indexOfAnyBut : changed conditional boundary → SURVIVED
2. indexOfAnyBut : negated conditional → KILLED
3. indexOfAnyBut : negated conditional → KILLED
                if (chFound && CharSequenceUtils.indexOf(searchChars, ch2, 0) < 0) {
2864 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                    return i;
2865
                }
2866
            } else {
2867 1 1. indexOfAnyBut : negated conditional → KILLED
                if (!chFound) {
2868 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                    return i;
2869
                }
2870
            }
2871
        }
2872 1 1. indexOfAnyBut : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return INDEX_NOT_FOUND;
2873
    }
2874
2875
    /**
2876
     * <p>Compares all CharSequences in an array and returns the index at which the
2877
     * CharSequences begin to differ.</p>
2878
     *
2879
     * <p>For example,
2880
     * {@code indexOfDifference(new String[] {"i am a machine", "i am a robot"}) -> 7}</p>
2881
     *
2882
     * <pre>
2883
     * StringUtils.indexOfDifference(null) = -1
2884
     * StringUtils.indexOfDifference(new String[] {}) = -1
2885
     * StringUtils.indexOfDifference(new String[] {"abc"}) = -1
2886
     * StringUtils.indexOfDifference(new String[] {null, null}) = -1
2887
     * StringUtils.indexOfDifference(new String[] {"", ""}) = -1
2888
     * StringUtils.indexOfDifference(new String[] {"", null}) = 0
2889
     * StringUtils.indexOfDifference(new String[] {"abc", null, null}) = 0
2890
     * StringUtils.indexOfDifference(new String[] {null, null, "abc"}) = 0
2891
     * StringUtils.indexOfDifference(new String[] {"", "abc"}) = 0
2892
     * StringUtils.indexOfDifference(new String[] {"abc", ""}) = 0
2893
     * StringUtils.indexOfDifference(new String[] {"abc", "abc"}) = -1
2894
     * StringUtils.indexOfDifference(new String[] {"abc", "a"}) = 1
2895
     * StringUtils.indexOfDifference(new String[] {"ab", "abxyz"}) = 2
2896
     * StringUtils.indexOfDifference(new String[] {"abcde", "abxyz"}) = 2
2897
     * StringUtils.indexOfDifference(new String[] {"abcde", "xyz"}) = 0
2898
     * StringUtils.indexOfDifference(new String[] {"xyz", "abcde"}) = 0
2899
     * StringUtils.indexOfDifference(new String[] {"i am a machine", "i am a robot"}) = 7
2900
     * </pre>
2901
     *
2902
     * @param css  array of CharSequences, entries may be null
2903
     * @return the index where the strings begin to differ; -1 if they are all equal
2904
     * @since 2.4
2905
     * @since 3.0 Changed signature from indexOfDifference(String...) to indexOfDifference(CharSequence...)
2906
     */
2907
    public static int indexOfDifference(final CharSequence... css) {
2908 3 1. indexOfDifference : changed conditional boundary → SURVIVED
2. indexOfDifference : negated conditional → KILLED
3. indexOfDifference : negated conditional → KILLED
        if (css == null || css.length <= 1) {
2909 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2910
        }
2911
        boolean anyStringNull = false;
2912
        boolean allStringsNull = true;
2913
        final int arrayLen = css.length;
2914
        int shortestStrLen = Integer.MAX_VALUE;
2915
        int longestStrLen = 0;
2916
2917
        // find the min and max string lengths; this avoids checking to make
2918
        // sure we are not exceeding the length of the string each time through
2919
        // the bottom loop.
2920
        for (final CharSequence cs : css) {
2921 1 1. indexOfDifference : negated conditional → KILLED
            if (cs == null) {
2922
                anyStringNull = true;
2923
                shortestStrLen = 0;
2924
            } else {
2925
                allStringsNull = false;
2926
                shortestStrLen = Math.min(cs.length(), shortestStrLen);
2927
                longestStrLen = Math.max(cs.length(), longestStrLen);
2928
            }
2929
        }
2930
2931
        // handle lists containing all nulls or all empty strings
2932 3 1. indexOfDifference : negated conditional → KILLED
2. indexOfDifference : negated conditional → KILLED
3. indexOfDifference : negated conditional → KILLED
        if (allStringsNull || longestStrLen == 0 && !anyStringNull) {
2933 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2934
        }
2935
2936
        // handle lists containing some nulls or some empty strings
2937 1 1. indexOfDifference : negated conditional → KILLED
        if (shortestStrLen == 0) {
2938 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return 0;
2939
        }
2940
2941
        // find the position with the first difference across all strings
2942
        int firstDiff = -1;
2943 3 1. indexOfDifference : changed conditional boundary → KILLED
2. indexOfDifference : Changed increment from 1 to -1 → KILLED
3. indexOfDifference : negated conditional → KILLED
        for (int stringPos = 0; stringPos < shortestStrLen; stringPos++) {
2944
            final char comparisonChar = css[0].charAt(stringPos);
2945 3 1. indexOfDifference : changed conditional boundary → KILLED
2. indexOfDifference : Changed increment from 1 to -1 → KILLED
3. indexOfDifference : negated conditional → KILLED
            for (int arrayPos = 1; arrayPos < arrayLen; arrayPos++) {
2946 1 1. indexOfDifference : negated conditional → KILLED
                if (css[arrayPos].charAt(stringPos) != comparisonChar) {
2947
                    firstDiff = stringPos;
2948
                    break;
2949
                }
2950
            }
2951 1 1. indexOfDifference : negated conditional → KILLED
            if (firstDiff != -1) {
2952
                break;
2953
            }
2954
        }
2955
2956 2 1. indexOfDifference : negated conditional → KILLED
2. indexOfDifference : negated conditional → KILLED
        if (firstDiff == -1 && shortestStrLen != longestStrLen) {
2957
            // we compared all of the characters up to the length of the
2958
            // shortest string and didn't find a match, but the string lengths
2959
            // vary, so return the length of the shortest string.
2960 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return shortestStrLen;
2961
        }
2962 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return firstDiff;
2963
    }
2964
2965
    /**
2966
     * <p>Compares two CharSequences, and returns the index at which the
2967
     * CharSequences begin to differ.</p>
2968
     *
2969
     * <p>For example,
2970
     * {@code indexOfDifference("i am a machine", "i am a robot") -> 7}</p>
2971
     *
2972
     * <pre>
2973
     * StringUtils.indexOfDifference(null, null) = -1
2974
     * StringUtils.indexOfDifference("", "") = -1
2975
     * StringUtils.indexOfDifference("", "abc") = 0
2976
     * StringUtils.indexOfDifference("abc", "") = 0
2977
     * StringUtils.indexOfDifference("abc", "abc") = -1
2978
     * StringUtils.indexOfDifference("ab", "abxyz") = 2
2979
     * StringUtils.indexOfDifference("abcde", "abxyz") = 2
2980
     * StringUtils.indexOfDifference("abcde", "xyz") = 0
2981
     * </pre>
2982
     *
2983
     * @param cs1  the first CharSequence, may be null
2984
     * @param cs2  the second CharSequence, may be null
2985
     * @return the index where cs1 and cs2 begin to differ; -1 if they are equal
2986
     * @since 2.0
2987
     * @since 3.0 Changed signature from indexOfDifference(String, String) to
2988
     * indexOfDifference(CharSequence, CharSequence)
2989
     */
2990
    public static int indexOfDifference(final CharSequence cs1, final CharSequence cs2) {
2991 1 1. indexOfDifference : negated conditional → KILLED
        if (cs1 == cs2) {
2992 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
2993
        }
2994 2 1. indexOfDifference : negated conditional → KILLED
2. indexOfDifference : negated conditional → KILLED
        if (cs1 == null || cs2 == null) {
2995 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return 0;
2996
        }
2997
        int i;
2998 5 1. indexOfDifference : changed conditional boundary → KILLED
2. indexOfDifference : changed conditional boundary → KILLED
3. indexOfDifference : Changed increment from 1 to -1 → KILLED
4. indexOfDifference : negated conditional → KILLED
5. indexOfDifference : negated conditional → KILLED
        for (i = 0; i < cs1.length() && i < cs2.length(); ++i) {
2999 1 1. indexOfDifference : negated conditional → KILLED
            if (cs1.charAt(i) != cs2.charAt(i)) {
3000
                break;
3001
            }
3002
        }
3003 4 1. indexOfDifference : changed conditional boundary → SURVIVED
2. indexOfDifference : changed conditional boundary → SURVIVED
3. indexOfDifference : negated conditional → KILLED
4. indexOfDifference : negated conditional → KILLED
        if (i < cs2.length() || i < cs1.length()) {
3004 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return i;
3005
        }
3006 1 1. indexOfDifference : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return INDEX_NOT_FOUND;
3007
    }
3008
3009
    /**
3010
     * <p>Case in-sensitive find of the first index within a CharSequence.</p>
3011
     *
3012
     * <p>A {@code null} CharSequence will return {@code -1}.
3013
     * A negative start position is treated as zero.
3014
     * An empty ("") search CharSequence always matches.
3015
     * A start position greater than the string length only matches
3016
     * an empty search CharSequence.</p>
3017
     *
3018
     * <pre>
3019
     * StringUtils.indexOfIgnoreCase(null, *)          = -1
3020
     * StringUtils.indexOfIgnoreCase(*, null)          = -1
3021
     * StringUtils.indexOfIgnoreCase("", "")           = 0
3022
     * StringUtils.indexOfIgnoreCase("aabaabaa", "a")  = 0
3023
     * StringUtils.indexOfIgnoreCase("aabaabaa", "b")  = 2
3024
     * StringUtils.indexOfIgnoreCase("aabaabaa", "ab") = 1
3025
     * </pre>
3026
     *
3027
     * @param str  the CharSequence to check, may be null
3028
     * @param searchStr  the CharSequence to find, may be null
3029
     * @return the first index of the search CharSequence,
3030
     *  -1 if no match or {@code null} string input
3031
     * @since 2.5
3032
     * @since 3.0 Changed signature from indexOfIgnoreCase(String, String) to indexOfIgnoreCase(CharSequence, CharSequence)
3033
     */
3034
    public static int indexOfIgnoreCase(final CharSequence str, final CharSequence searchStr) {
3035 1 1. indexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return indexOfIgnoreCase(str, searchStr, 0);
3036
    }
3037
3038
    /**
3039
     * <p>Case in-sensitive find of the first index within a CharSequence
3040
     * from the specified position.</p>
3041
     *
3042
     * <p>A {@code null} CharSequence will return {@code -1}.
3043
     * A negative start position is treated as zero.
3044
     * An empty ("") search CharSequence always matches.
3045
     * A start position greater than the string length only matches
3046
     * an empty search CharSequence.</p>
3047
     *
3048
     * <pre>
3049
     * StringUtils.indexOfIgnoreCase(null, *, *)          = -1
3050
     * StringUtils.indexOfIgnoreCase(*, null, *)          = -1
3051
     * StringUtils.indexOfIgnoreCase("", "", 0)           = 0
3052
     * StringUtils.indexOfIgnoreCase("aabaabaa", "A", 0)  = 0
3053
     * StringUtils.indexOfIgnoreCase("aabaabaa", "B", 0)  = 2
3054
     * StringUtils.indexOfIgnoreCase("aabaabaa", "AB", 0) = 1
3055
     * StringUtils.indexOfIgnoreCase("aabaabaa", "B", 3)  = 5
3056
     * StringUtils.indexOfIgnoreCase("aabaabaa", "B", 9)  = -1
3057
     * StringUtils.indexOfIgnoreCase("aabaabaa", "B", -1) = 2
3058
     * StringUtils.indexOfIgnoreCase("aabaabaa", "", 2)   = 2
3059
     * StringUtils.indexOfIgnoreCase("abc", "", 9)        = -1
3060
     * </pre>
3061
     *
3062
     * @param str  the CharSequence to check, may be null
3063
     * @param searchStr  the CharSequence to find, may be null
3064
     * @param startPos  the start position, negative treated as zero
3065
     * @return the first index of the search CharSequence (always &ge; startPos),
3066
     *  -1 if no match or {@code null} string input
3067
     * @since 2.5
3068
     * @since 3.0 Changed signature from indexOfIgnoreCase(String, String, int) to indexOfIgnoreCase(CharSequence, CharSequence, int)
3069
     */
3070
    public static int indexOfIgnoreCase(final CharSequence str, final CharSequence searchStr, int startPos) {
3071 2 1. indexOfIgnoreCase : negated conditional → KILLED
2. indexOfIgnoreCase : negated conditional → KILLED
        if (str == null || searchStr == null) {
3072 1 1. indexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
3073
        }
3074 2 1. indexOfIgnoreCase : changed conditional boundary → SURVIVED
2. indexOfIgnoreCase : negated conditional → KILLED
        if (startPos < 0) {
3075
            startPos = 0;
3076
        }
3077 2 1. indexOfIgnoreCase : Replaced integer subtraction with addition → SURVIVED
2. indexOfIgnoreCase : Replaced integer addition with subtraction → KILLED
        final int endLimit = str.length() - searchStr.length() + 1;
3078 2 1. indexOfIgnoreCase : changed conditional boundary → SURVIVED
2. indexOfIgnoreCase : negated conditional → KILLED
        if (startPos > endLimit) {
3079 1 1. indexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
3080
        }
3081 1 1. indexOfIgnoreCase : negated conditional → KILLED
        if (searchStr.length() == 0) {
3082 1 1. indexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return startPos;
3083
        }
3084 3 1. indexOfIgnoreCase : changed conditional boundary → SURVIVED
2. indexOfIgnoreCase : Changed increment from 1 to -1 → TIMED_OUT
3. indexOfIgnoreCase : negated conditional → KILLED
        for (int i = startPos; i < endLimit; i++) {
3085 1 1. indexOfIgnoreCase : negated conditional → KILLED
            if (CharSequenceUtils.regionMatches(str, true, i, searchStr, 0, searchStr.length())) {
3086 1 1. indexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return i;
3087
            }
3088
        }
3089 1 1. indexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return INDEX_NOT_FOUND;
3090
    }
3091
3092
    /**
3093
     * <p>Checks if all of the CharSequences are empty (""), null or whitespace only.</p>
3094
     *
3095
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3096
     *
3097
     * <pre>
3098
     * StringUtils.isAllBlank(null)             = true
3099
     * StringUtils.isAllBlank(null, "foo")      = false
3100
     * StringUtils.isAllBlank(null, null)       = true
3101
     * StringUtils.isAllBlank("", "bar")        = false
3102
     * StringUtils.isAllBlank("bob", "")        = false
3103
     * StringUtils.isAllBlank("  bob  ", null)  = false
3104
     * StringUtils.isAllBlank(" ", "bar")       = false
3105
     * StringUtils.isAllBlank("foo", "bar")     = false
3106
     * StringUtils.isAllBlank(new String[] {})  = true
3107
     * </pre>
3108
     *
3109
     * @param css  the CharSequences to check, may be null or empty
3110
     * @return {@code true} if all of the CharSequences are empty or null or whitespace only
3111
     * @since 3.6
3112
     */
3113
    public static boolean isAllBlank(final CharSequence... css) {
3114 1 1. isAllBlank : negated conditional → KILLED
        if (ArrayUtils.isEmpty(css)) {
3115 1 1. isAllBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
3116
        }
3117
        for (final CharSequence cs : css) {
3118 1 1. isAllBlank : negated conditional → KILLED
            if (isNotBlank(cs)) {
3119 1 1. isAllBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
               return false;
3120
            }
3121
        }
3122 1 1. isAllBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3123
    }
3124
3125
    /**
3126
     * <p>Checks if all of the CharSequences are empty ("") or null.</p>
3127
     *
3128
     * <pre>
3129
     * StringUtils.isAllEmpty(null)             = true
3130
     * StringUtils.isAllEmpty(null, "")         = true
3131
     * StringUtils.isAllEmpty(new String[] {})  = true
3132
     * StringUtils.isAllEmpty(null, "foo")      = false
3133
     * StringUtils.isAllEmpty("", "bar")        = false
3134
     * StringUtils.isAllEmpty("bob", "")        = false
3135
     * StringUtils.isAllEmpty("  bob  ", null)  = false
3136
     * StringUtils.isAllEmpty(" ", "bar")       = false
3137
     * StringUtils.isAllEmpty("foo", "bar")     = false
3138
     * </pre>
3139
     *
3140
     * @param css  the CharSequences to check, may be null or empty
3141
     * @return {@code true} if all of the CharSequences are empty or null
3142
     * @since 3.6
3143
     */
3144
    public static boolean isAllEmpty(final CharSequence... css) {
3145 1 1. isAllEmpty : negated conditional → KILLED
        if (ArrayUtils.isEmpty(css)) {
3146 1 1. isAllEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
3147
        }
3148
        for (final CharSequence cs : css) {
3149 1 1. isAllEmpty : negated conditional → KILLED
            if (isNotEmpty(cs)) {
3150 1 1. isAllEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3151
            }
3152
        }
3153 1 1. isAllEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3154
    }
3155
3156
    /**
3157
     * <p>Checks if the CharSequence contains only lowercase characters.</p>
3158
     *
3159
     * <p>{@code null} will return {@code false}.
3160
     * An empty CharSequence (length()=0) will return {@code false}.</p>
3161
     *
3162
     * <pre>
3163
     * StringUtils.isAllLowerCase(null)   = false
3164
     * StringUtils.isAllLowerCase("")     = false
3165
     * StringUtils.isAllLowerCase("  ")   = false
3166
     * StringUtils.isAllLowerCase("abc")  = true
3167
     * StringUtils.isAllLowerCase("abC")  = false
3168
     * StringUtils.isAllLowerCase("ab c") = false
3169
     * StringUtils.isAllLowerCase("ab1c") = false
3170
     * StringUtils.isAllLowerCase("ab/c") = false
3171
     * </pre>
3172
     *
3173
     * @param cs  the CharSequence to check, may be null
3174
     * @return {@code true} if only contains lowercase characters, and is non-null
3175
     * @since 2.5
3176
     * @since 3.0 Changed signature from isAllLowerCase(String) to isAllLowerCase(CharSequence)
3177
     */
3178
    public static boolean isAllLowerCase(final CharSequence cs) {
3179 2 1. isAllLowerCase : negated conditional → KILLED
2. isAllLowerCase : negated conditional → KILLED
        if (cs == null || isEmpty(cs)) {
3180 1 1. isAllLowerCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3181
        }
3182
        final int sz = cs.length();
3183 3 1. isAllLowerCase : changed conditional boundary → KILLED
2. isAllLowerCase : Changed increment from 1 to -1 → KILLED
3. isAllLowerCase : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3184 1 1. isAllLowerCase : negated conditional → KILLED
            if (!Character.isLowerCase(cs.charAt(i))) {
3185 1 1. isAllLowerCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3186
            }
3187
        }
3188 1 1. isAllLowerCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3189
    }
3190
3191
    /**
3192
     * <p>Checks if the CharSequence contains only uppercase characters.</p>
3193
     *
3194
     * <p>{@code null} will return {@code false}.
3195
     * An empty String (length()=0) will return {@code false}.</p>
3196
     *
3197
     * <pre>
3198
     * StringUtils.isAllUpperCase(null)   = false
3199
     * StringUtils.isAllUpperCase("")     = false
3200
     * StringUtils.isAllUpperCase("  ")   = false
3201
     * StringUtils.isAllUpperCase("ABC")  = true
3202
     * StringUtils.isAllUpperCase("aBC")  = false
3203
     * StringUtils.isAllUpperCase("A C")  = false
3204
     * StringUtils.isAllUpperCase("A1C")  = false
3205
     * StringUtils.isAllUpperCase("A/C")  = false
3206
     * </pre>
3207
     *
3208
     * @param cs the CharSequence to check, may be null
3209
     * @return {@code true} if only contains uppercase characters, and is non-null
3210
     * @since 2.5
3211
     * @since 3.0 Changed signature from isAllUpperCase(String) to isAllUpperCase(CharSequence)
3212
     */
3213
    public static boolean isAllUpperCase(final CharSequence cs) {
3214 2 1. isAllUpperCase : negated conditional → KILLED
2. isAllUpperCase : negated conditional → KILLED
        if (cs == null || isEmpty(cs)) {
3215 1 1. isAllUpperCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3216
        }
3217
        final int sz = cs.length();
3218 3 1. isAllUpperCase : changed conditional boundary → KILLED
2. isAllUpperCase : Changed increment from 1 to -1 → KILLED
3. isAllUpperCase : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3219 1 1. isAllUpperCase : negated conditional → KILLED
            if (!Character.isUpperCase(cs.charAt(i))) {
3220 1 1. isAllUpperCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3221
            }
3222
        }
3223 1 1. isAllUpperCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3224
    }
3225
3226
    // Character Tests
3227
    //-----------------------------------------------------------------------
3228
    /**
3229
     * <p>Checks if the CharSequence contains only Unicode letters.</p>
3230
     *
3231
     * <p>{@code null} will return {@code false}.
3232
     * An empty CharSequence (length()=0) will return {@code false}.</p>
3233
     *
3234
     * <pre>
3235
     * StringUtils.isAlpha(null)   = false
3236
     * StringUtils.isAlpha("")     = false
3237
     * StringUtils.isAlpha("  ")   = false
3238
     * StringUtils.isAlpha("abc")  = true
3239
     * StringUtils.isAlpha("ab2c") = false
3240
     * StringUtils.isAlpha("ab-c") = false
3241
     * </pre>
3242
     *
3243
     * @param cs  the CharSequence to check, may be null
3244
     * @return {@code true} if only contains letters, and is non-null
3245
     * @since 3.0 Changed signature from isAlpha(String) to isAlpha(CharSequence)
3246
     * @since 3.0 Changed "" to return false and not true
3247
     */
3248
    public static boolean isAlpha(final CharSequence cs) {
3249 1 1. isAlpha : negated conditional → KILLED
        if (isEmpty(cs)) {
3250 1 1. isAlpha : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3251
        }
3252
        final int sz = cs.length();
3253 3 1. isAlpha : changed conditional boundary → KILLED
2. isAlpha : Changed increment from 1 to -1 → KILLED
3. isAlpha : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3254 1 1. isAlpha : negated conditional → KILLED
            if (!Character.isLetter(cs.charAt(i))) {
3255 1 1. isAlpha : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3256
            }
3257
        }
3258 1 1. isAlpha : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3259
    }
3260
3261
    /**
3262
     * <p>Checks if the CharSequence contains only Unicode letters or digits.</p>
3263
     *
3264
     * <p>{@code null} will return {@code false}.
3265
     * An empty CharSequence (length()=0) will return {@code false}.</p>
3266
     *
3267
     * <pre>
3268
     * StringUtils.isAlphanumeric(null)   = false
3269
     * StringUtils.isAlphanumeric("")     = false
3270
     * StringUtils.isAlphanumeric("  ")   = false
3271
     * StringUtils.isAlphanumeric("abc")  = true
3272
     * StringUtils.isAlphanumeric("ab c") = false
3273
     * StringUtils.isAlphanumeric("ab2c") = true
3274
     * StringUtils.isAlphanumeric("ab-c") = false
3275
     * </pre>
3276
     *
3277
     * @param cs  the CharSequence to check, may be null
3278
     * @return {@code true} if only contains letters or digits,
3279
     *  and is non-null
3280
     * @since 3.0 Changed signature from isAlphanumeric(String) to isAlphanumeric(CharSequence)
3281
     * @since 3.0 Changed "" to return false and not true
3282
     */
3283
    public static boolean isAlphanumeric(final CharSequence cs) {
3284 1 1. isAlphanumeric : negated conditional → KILLED
        if (isEmpty(cs)) {
3285 1 1. isAlphanumeric : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3286
        }
3287
        final int sz = cs.length();
3288 3 1. isAlphanumeric : changed conditional boundary → KILLED
2. isAlphanumeric : Changed increment from 1 to -1 → KILLED
3. isAlphanumeric : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3289 1 1. isAlphanumeric : negated conditional → KILLED
            if (!Character.isLetterOrDigit(cs.charAt(i))) {
3290 1 1. isAlphanumeric : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3291
            }
3292
        }
3293 1 1. isAlphanumeric : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3294
    }
3295
3296
    /**
3297
     * <p>Checks if the CharSequence contains only Unicode letters, digits
3298
     * or space ({@code ' '}).</p>
3299
     *
3300
     * <p>{@code null} will return {@code false}.
3301
     * An empty CharSequence (length()=0) will return {@code true}.</p>
3302
     *
3303
     * <pre>
3304
     * StringUtils.isAlphanumericSpace(null)   = false
3305
     * StringUtils.isAlphanumericSpace("")     = true
3306
     * StringUtils.isAlphanumericSpace("  ")   = true
3307
     * StringUtils.isAlphanumericSpace("abc")  = true
3308
     * StringUtils.isAlphanumericSpace("ab c") = true
3309
     * StringUtils.isAlphanumericSpace("ab2c") = true
3310
     * StringUtils.isAlphanumericSpace("ab-c") = false
3311
     * </pre>
3312
     *
3313
     * @param cs  the CharSequence to check, may be null
3314
     * @return {@code true} if only contains letters, digits or space,
3315
     *  and is non-null
3316
     * @since 3.0 Changed signature from isAlphanumericSpace(String) to isAlphanumericSpace(CharSequence)
3317
     */
3318
    public static boolean isAlphanumericSpace(final CharSequence cs) {
3319 1 1. isAlphanumericSpace : negated conditional → KILLED
        if (cs == null) {
3320 1 1. isAlphanumericSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3321
        }
3322
        final int sz = cs.length();
3323 3 1. isAlphanumericSpace : changed conditional boundary → KILLED
2. isAlphanumericSpace : Changed increment from 1 to -1 → KILLED
3. isAlphanumericSpace : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3324 2 1. isAlphanumericSpace : negated conditional → KILLED
2. isAlphanumericSpace : negated conditional → KILLED
            if (!Character.isLetterOrDigit(cs.charAt(i)) && cs.charAt(i) != ' ') {
3325 1 1. isAlphanumericSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3326
            }
3327
        }
3328 1 1. isAlphanumericSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3329
    }
3330
3331
    /**
3332
     * <p>Checks if the CharSequence contains only Unicode letters and
3333
     * space (' ').</p>
3334
     *
3335
     * <p>{@code null} will return {@code false}
3336
     * An empty CharSequence (length()=0) will return {@code true}.</p>
3337
     *
3338
     * <pre>
3339
     * StringUtils.isAlphaSpace(null)   = false
3340
     * StringUtils.isAlphaSpace("")     = true
3341
     * StringUtils.isAlphaSpace("  ")   = true
3342
     * StringUtils.isAlphaSpace("abc")  = true
3343
     * StringUtils.isAlphaSpace("ab c") = true
3344
     * StringUtils.isAlphaSpace("ab2c") = false
3345
     * StringUtils.isAlphaSpace("ab-c") = false
3346
     * </pre>
3347
     *
3348
     * @param cs  the CharSequence to check, may be null
3349
     * @return {@code true} if only contains letters and space,
3350
     *  and is non-null
3351
     * @since 3.0 Changed signature from isAlphaSpace(String) to isAlphaSpace(CharSequence)
3352
     */
3353
    public static boolean isAlphaSpace(final CharSequence cs) {
3354 1 1. isAlphaSpace : negated conditional → KILLED
        if (cs == null) {
3355 1 1. isAlphaSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3356
        }
3357
        final int sz = cs.length();
3358 3 1. isAlphaSpace : changed conditional boundary → KILLED
2. isAlphaSpace : Changed increment from 1 to -1 → KILLED
3. isAlphaSpace : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3359 2 1. isAlphaSpace : negated conditional → KILLED
2. isAlphaSpace : negated conditional → KILLED
            if (!Character.isLetter(cs.charAt(i)) && cs.charAt(i) != ' ') {
3360 1 1. isAlphaSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3361
            }
3362
        }
3363 1 1. isAlphaSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3364
    }
3365
3366
    /**
3367
     * <p>Checks if any of the CharSequences are empty ("") or null or whitespace only.</p>
3368
     *
3369
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3370
     *
3371
     * <pre>
3372
     * StringUtils.isAnyBlank((String) null)    = true
3373
     * StringUtils.isAnyBlank((String[]) null)  = false
3374
     * StringUtils.isAnyBlank(null, "foo")      = true
3375
     * StringUtils.isAnyBlank(null, null)       = true
3376
     * StringUtils.isAnyBlank("", "bar")        = true
3377
     * StringUtils.isAnyBlank("bob", "")        = true
3378
     * StringUtils.isAnyBlank("  bob  ", null)  = true
3379
     * StringUtils.isAnyBlank(" ", "bar")       = true
3380
     * StringUtils.isAnyBlank(new String[] {})  = false
3381
     * StringUtils.isAnyBlank(new String[]{""}) = true
3382
     * StringUtils.isAnyBlank("foo", "bar")     = false
3383
     * </pre>
3384
     *
3385
     * @param css  the CharSequences to check, may be null or empty
3386
     * @return {@code true} if any of the CharSequences are empty or null or whitespace only
3387
     * @since 3.2
3388
     */
3389
    public static boolean isAnyBlank(final CharSequence... css) {
3390 1 1. isAnyBlank : negated conditional → KILLED
      if (ArrayUtils.isEmpty(css)) {
3391 1 1. isAnyBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
3392
      }
3393
      for (final CharSequence cs : css) {
3394 1 1. isAnyBlank : negated conditional → KILLED
        if (isBlank(cs)) {
3395 1 1. isAnyBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
          return true;
3396
        }
3397
      }
3398 1 1. isAnyBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
      return false;
3399
    }
3400
3401
    /**
3402
     * <p>Checks if any of the CharSequences are empty ("") or null.</p>
3403
     *
3404
     * <pre>
3405
     * StringUtils.isAnyEmpty((String) null)    = true
3406
     * StringUtils.isAnyEmpty((String[]) null)  = false
3407
     * StringUtils.isAnyEmpty(null, "foo")      = true
3408
     * StringUtils.isAnyEmpty("", "bar")        = true
3409
     * StringUtils.isAnyEmpty("bob", "")        = true
3410
     * StringUtils.isAnyEmpty("  bob  ", null)  = true
3411
     * StringUtils.isAnyEmpty(" ", "bar")       = false
3412
     * StringUtils.isAnyEmpty("foo", "bar")     = false
3413
     * StringUtils.isAnyEmpty(new String[]{})   = false
3414
     * StringUtils.isAnyEmpty(new String[]{""}) = true
3415
     * </pre>
3416
     *
3417
     * @param css  the CharSequences to check, may be null or empty
3418
     * @return {@code true} if any of the CharSequences are empty or null
3419
     * @since 3.2
3420
     */
3421
    public static boolean isAnyEmpty(final CharSequence... css) {
3422 1 1. isAnyEmpty : negated conditional → KILLED
      if (ArrayUtils.isEmpty(css)) {
3423 1 1. isAnyEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
3424
      }
3425
      for (final CharSequence cs : css) {
3426 1 1. isAnyEmpty : negated conditional → KILLED
        if (isEmpty(cs)) {
3427 1 1. isAnyEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
          return true;
3428
        }
3429
      }
3430 1 1. isAnyEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
      return false;
3431
    }
3432
3433
    /**
3434
     * <p>Checks if the CharSequence contains only ASCII printable characters.</p>
3435
     *
3436
     * <p>{@code null} will return {@code false}.
3437
     * An empty CharSequence (length()=0) will return {@code true}.</p>
3438
     *
3439
     * <pre>
3440
     * StringUtils.isAsciiPrintable(null)     = false
3441
     * StringUtils.isAsciiPrintable("")       = true
3442
     * StringUtils.isAsciiPrintable(" ")      = true
3443
     * StringUtils.isAsciiPrintable("Ceki")   = true
3444
     * StringUtils.isAsciiPrintable("ab2c")   = true
3445
     * StringUtils.isAsciiPrintable("!ab-c~") = true
3446
     * StringUtils.isAsciiPrintable("\u0020") = true
3447
     * StringUtils.isAsciiPrintable("\u0021") = true
3448
     * StringUtils.isAsciiPrintable("\u007e") = true
3449
     * StringUtils.isAsciiPrintable("\u007f") = false
3450
     * StringUtils.isAsciiPrintable("Ceki G\u00fclc\u00fc") = false
3451
     * </pre>
3452
     *
3453
     * @param cs the CharSequence to check, may be null
3454
     * @return {@code true} if every character is in the range
3455
     *  32 thru 126
3456
     * @since 2.1
3457
     * @since 3.0 Changed signature from isAsciiPrintable(String) to isAsciiPrintable(CharSequence)
3458
     */
3459
    public static boolean isAsciiPrintable(final CharSequence cs) {
3460 1 1. isAsciiPrintable : negated conditional → KILLED
        if (cs == null) {
3461 1 1. isAsciiPrintable : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3462
        }
3463
        final int sz = cs.length();
3464 3 1. isAsciiPrintable : changed conditional boundary → KILLED
2. isAsciiPrintable : Changed increment from 1 to -1 → KILLED
3. isAsciiPrintable : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3465 1 1. isAsciiPrintable : negated conditional → KILLED
            if (!CharUtils.isAsciiPrintable(cs.charAt(i))) {
3466 1 1. isAsciiPrintable : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3467
            }
3468
        }
3469 1 1. isAsciiPrintable : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3470
    }
3471
3472
    // Nested extraction
3473
    //-----------------------------------------------------------------------
3474
3475
    /**
3476
     * <p>Checks if a CharSequence is empty (""), null or whitespace only.</p>
3477
     *
3478
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3479
     *
3480
     * <pre>
3481
     * StringUtils.isBlank(null)      = true
3482
     * StringUtils.isBlank("")        = true
3483
     * StringUtils.isBlank(" ")       = true
3484
     * StringUtils.isBlank("bob")     = false
3485
     * StringUtils.isBlank("  bob  ") = false
3486
     * </pre>
3487
     *
3488
     * @param cs  the CharSequence to check, may be null
3489
     * @return {@code true} if the CharSequence is null, empty or whitespace only
3490
     * @since 2.0
3491
     * @since 3.0 Changed signature from isBlank(String) to isBlank(CharSequence)
3492
     */
3493
    public static boolean isBlank(final CharSequence cs) {
3494
        int strLen;
3495 2 1. isBlank : negated conditional → KILLED
2. isBlank : negated conditional → KILLED
        if (cs == null || (strLen = cs.length()) == 0) {
3496 1 1. isBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return true;
3497
        }
3498 3 1. isBlank : changed conditional boundary → KILLED
2. isBlank : Changed increment from 1 to -1 → KILLED
3. isBlank : negated conditional → KILLED
        for (int i = 0; i < strLen; i++) {
3499 1 1. isBlank : negated conditional → KILLED
            if (!Character.isWhitespace(cs.charAt(i))) {
3500 1 1. isBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3501
            }
3502
        }
3503 1 1. isBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3504
    }
3505
3506
    // Empty checks
3507
    //-----------------------------------------------------------------------
3508
    /**
3509
     * <p>Checks if a CharSequence is empty ("") or null.</p>
3510
     *
3511
     * <pre>
3512
     * StringUtils.isEmpty(null)      = true
3513
     * StringUtils.isEmpty("")        = true
3514
     * StringUtils.isEmpty(" ")       = false
3515
     * StringUtils.isEmpty("bob")     = false
3516
     * StringUtils.isEmpty("  bob  ") = false
3517
     * </pre>
3518
     *
3519
     * <p>NOTE: This method changed in Lang version 2.0.
3520
     * It no longer trims the CharSequence.
3521
     * That functionality is available in isBlank().</p>
3522
     *
3523
     * @param cs  the CharSequence to check, may be null
3524
     * @return {@code true} if the CharSequence is empty or null
3525
     * @since 3.0 Changed signature from isEmpty(String) to isEmpty(CharSequence)
3526
     */
3527
    public static boolean isEmpty(final CharSequence cs) {
3528 3 1. isEmpty : negated conditional → KILLED
2. isEmpty : negated conditional → KILLED
3. isEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return cs == null || cs.length() == 0;
3529
    }
3530
3531
    /**
3532
     * <p>Checks if the CharSequence contains mixed casing of both uppercase and lowercase characters.</p>
3533
     *
3534
     * <p>{@code null} will return {@code false}. An empty CharSequence ({@code length()=0}) will return
3535
     * {@code false}.</p>
3536
     *
3537
     * <pre>
3538
     * StringUtils.isMixedCase(null)    = false
3539
     * StringUtils.isMixedCase("")      = false
3540
     * StringUtils.isMixedCase("ABC")   = false
3541
     * StringUtils.isMixedCase("abc")   = false
3542
     * StringUtils.isMixedCase("aBc")   = true
3543
     * StringUtils.isMixedCase("A c")   = true
3544
     * StringUtils.isMixedCase("A1c")   = true
3545
     * StringUtils.isMixedCase("a/C")   = true
3546
     * StringUtils.isMixedCase("aC\t")  = true
3547
     * </pre>
3548
     *
3549
     * @param cs the CharSequence to check, may be null
3550
     * @return {@code true} if the CharSequence contains both uppercase and lowercase characters
3551
     * @since 3.5
3552
     */
3553
    public static boolean isMixedCase(final CharSequence cs) {
3554 2 1. isMixedCase : negated conditional → KILLED
2. isMixedCase : negated conditional → KILLED
        if (isEmpty(cs) || cs.length() == 1) {
3555 1 1. isMixedCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3556
        }
3557
        boolean containsUppercase = false;
3558
        boolean containsLowercase = false;
3559
        final int sz = cs.length();
3560 3 1. isMixedCase : changed conditional boundary → KILLED
2. isMixedCase : Changed increment from 1 to -1 → KILLED
3. isMixedCase : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3561 2 1. isMixedCase : negated conditional → KILLED
2. isMixedCase : negated conditional → KILLED
            if (containsUppercase && containsLowercase) {
3562 1 1. isMixedCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return true;
3563 1 1. isMixedCase : negated conditional → KILLED
            } else if (Character.isUpperCase(cs.charAt(i))) {
3564
                containsUppercase = true;
3565 1 1. isMixedCase : negated conditional → KILLED
            } else if (Character.isLowerCase(cs.charAt(i))) {
3566
                containsLowercase = true;
3567
            }
3568
        }
3569 3 1. isMixedCase : negated conditional → KILLED
2. isMixedCase : negated conditional → KILLED
3. isMixedCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return containsUppercase && containsLowercase;
3570
    }
3571
3572
    /**
3573
     * <p>Checks if none of the CharSequences are empty (""), null or whitespace only.</p>
3574
     *
3575
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3576
     *
3577
     * <pre>
3578
     * StringUtils.isNoneBlank((String) null)    = false
3579
     * StringUtils.isNoneBlank((String[]) null)  = true
3580
     * StringUtils.isNoneBlank(null, "foo")      = false
3581
     * StringUtils.isNoneBlank(null, null)       = false
3582
     * StringUtils.isNoneBlank("", "bar")        = false
3583
     * StringUtils.isNoneBlank("bob", "")        = false
3584
     * StringUtils.isNoneBlank("  bob  ", null)  = false
3585
     * StringUtils.isNoneBlank(" ", "bar")       = false
3586
     * StringUtils.isNoneBlank(new String[] {})  = true
3587
     * StringUtils.isNoneBlank(new String[]{""}) = false
3588
     * StringUtils.isNoneBlank("foo", "bar")     = true
3589
     * </pre>
3590
     *
3591
     * @param css  the CharSequences to check, may be null or empty
3592
     * @return {@code true} if none of the CharSequences are empty or null or whitespace only
3593
     * @since 3.2
3594
     */
3595
    public static boolean isNoneBlank(final CharSequence... css) {
3596 2 1. isNoneBlank : negated conditional → KILLED
2. isNoneBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
      return !isAnyBlank(css);
3597
    }
3598
3599
    /**
3600
     * <p>Checks if none of the CharSequences are empty ("") or null.</p>
3601
     *
3602
     * <pre>
3603
     * StringUtils.isNoneEmpty((String) null)    = false
3604
     * StringUtils.isNoneEmpty((String[]) null)  = true
3605
     * StringUtils.isNoneEmpty(null, "foo")      = false
3606
     * StringUtils.isNoneEmpty("", "bar")        = false
3607
     * StringUtils.isNoneEmpty("bob", "")        = false
3608
     * StringUtils.isNoneEmpty("  bob  ", null)  = false
3609
     * StringUtils.isNoneEmpty(new String[] {})  = true
3610
     * StringUtils.isNoneEmpty(new String[]{""}) = false
3611
     * StringUtils.isNoneEmpty(" ", "bar")       = true
3612
     * StringUtils.isNoneEmpty("foo", "bar")     = true
3613
     * </pre>
3614
     *
3615
     * @param css  the CharSequences to check, may be null or empty
3616
     * @return {@code true} if none of the CharSequences are empty or null
3617
     * @since 3.2
3618
     */
3619
    public static boolean isNoneEmpty(final CharSequence... css) {
3620 2 1. isNoneEmpty : negated conditional → KILLED
2. isNoneEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
      return !isAnyEmpty(css);
3621
    }
3622
3623
    /**
3624
     * <p>Checks if a CharSequence is not empty (""), not null and not whitespace only.</p>
3625
     *
3626
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3627
     *
3628
     * <pre>
3629
     * StringUtils.isNotBlank(null)      = false
3630
     * StringUtils.isNotBlank("")        = false
3631
     * StringUtils.isNotBlank(" ")       = false
3632
     * StringUtils.isNotBlank("bob")     = true
3633
     * StringUtils.isNotBlank("  bob  ") = true
3634
     * </pre>
3635
     *
3636
     * @param cs  the CharSequence to check, may be null
3637
     * @return {@code true} if the CharSequence is
3638
     *  not empty and not null and not whitespace only
3639
     * @since 2.0
3640
     * @since 3.0 Changed signature from isNotBlank(String) to isNotBlank(CharSequence)
3641
     */
3642
    public static boolean isNotBlank(final CharSequence cs) {
3643 2 1. isNotBlank : negated conditional → KILLED
2. isNotBlank : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return !isBlank(cs);
3644
    }
3645
3646
    /**
3647
     * <p>Checks if a CharSequence is not empty ("") and not null.</p>
3648
     *
3649
     * <pre>
3650
     * StringUtils.isNotEmpty(null)      = false
3651
     * StringUtils.isNotEmpty("")        = false
3652
     * StringUtils.isNotEmpty(" ")       = true
3653
     * StringUtils.isNotEmpty("bob")     = true
3654
     * StringUtils.isNotEmpty("  bob  ") = true
3655
     * </pre>
3656
     *
3657
     * @param cs  the CharSequence to check, may be null
3658
     * @return {@code true} if the CharSequence is not empty and not null
3659
     * @since 3.0 Changed signature from isNotEmpty(String) to isNotEmpty(CharSequence)
3660
     */
3661
    public static boolean isNotEmpty(final CharSequence cs) {
3662 2 1. isNotEmpty : negated conditional → KILLED
2. isNotEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return !isEmpty(cs);
3663
    }
3664
3665
    /**
3666
     * <p>Checks if the CharSequence contains only Unicode digits.
3667
     * A decimal point is not a Unicode digit and returns false.</p>
3668
     *
3669
     * <p>{@code null} will return {@code false}.
3670
     * An empty CharSequence (length()=0) will return {@code false}.</p>
3671
     *
3672
     * <p>Note that the method does not allow for a leading sign, either positive or negative.
3673
     * Also, if a String passes the numeric test, it may still generate a NumberFormatException
3674
     * when parsed by Integer.parseInt or Long.parseLong, e.g. if the value is outside the range
3675
     * for int or long respectively.</p>
3676
     *
3677
     * <pre>
3678
     * StringUtils.isNumeric(null)   = false
3679
     * StringUtils.isNumeric("")     = false
3680
     * StringUtils.isNumeric("  ")   = false
3681
     * StringUtils.isNumeric("123")  = true
3682
     * StringUtils.isNumeric("\u0967\u0968\u0969")  = true
3683
     * StringUtils.isNumeric("12 3") = false
3684
     * StringUtils.isNumeric("ab2c") = false
3685
     * StringUtils.isNumeric("12-3") = false
3686
     * StringUtils.isNumeric("12.3") = false
3687
     * StringUtils.isNumeric("-123") = false
3688
     * StringUtils.isNumeric("+123") = false
3689
     * </pre>
3690
     *
3691
     * @param cs  the CharSequence to check, may be null
3692
     * @return {@code true} if only contains digits, and is non-null
3693
     * @since 3.0 Changed signature from isNumeric(String) to isNumeric(CharSequence)
3694
     * @since 3.0 Changed "" to return false and not true
3695
     */
3696
    public static boolean isNumeric(final CharSequence cs) {
3697 1 1. isNumeric : negated conditional → KILLED
        if (isEmpty(cs)) {
3698 1 1. isNumeric : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3699
        }
3700
        final int sz = cs.length();
3701 3 1. isNumeric : changed conditional boundary → KILLED
2. isNumeric : Changed increment from 1 to -1 → KILLED
3. isNumeric : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3702 1 1. isNumeric : negated conditional → KILLED
            if (!Character.isDigit(cs.charAt(i))) {
3703 1 1. isNumeric : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3704
            }
3705
        }
3706 1 1. isNumeric : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3707
    }
3708
3709
    /**
3710
     * <p>Checks if the CharSequence contains only Unicode digits or space
3711
     * ({@code ' '}).
3712
     * A decimal point is not a Unicode digit and returns false.</p>
3713
     *
3714
     * <p>{@code null} will return {@code false}.
3715
     * An empty CharSequence (length()=0) will return {@code true}.</p>
3716
     *
3717
     * <pre>
3718
     * StringUtils.isNumericSpace(null)   = false
3719
     * StringUtils.isNumericSpace("")     = true
3720
     * StringUtils.isNumericSpace("  ")   = true
3721
     * StringUtils.isNumericSpace("123")  = true
3722
     * StringUtils.isNumericSpace("12 3") = true
3723
     * StringUtils.isNumeric("\u0967\u0968\u0969")  = true
3724
     * StringUtils.isNumeric("\u0967\u0968 \u0969")  = true
3725
     * StringUtils.isNumericSpace("ab2c") = false
3726
     * StringUtils.isNumericSpace("12-3") = false
3727
     * StringUtils.isNumericSpace("12.3") = false
3728
     * </pre>
3729
     *
3730
     * @param cs  the CharSequence to check, may be null
3731
     * @return {@code true} if only contains digits or space,
3732
     *  and is non-null
3733
     * @since 3.0 Changed signature from isNumericSpace(String) to isNumericSpace(CharSequence)
3734
     */
3735
    public static boolean isNumericSpace(final CharSequence cs) {
3736 1 1. isNumericSpace : negated conditional → KILLED
        if (cs == null) {
3737 1 1. isNumericSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3738
        }
3739
        final int sz = cs.length();
3740 3 1. isNumericSpace : changed conditional boundary → KILLED
2. isNumericSpace : Changed increment from 1 to -1 → KILLED
3. isNumericSpace : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3741 2 1. isNumericSpace : negated conditional → KILLED
2. isNumericSpace : negated conditional → KILLED
            if (!Character.isDigit(cs.charAt(i)) && cs.charAt(i) != ' ') {
3742 1 1. isNumericSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3743
            }
3744
        }
3745 1 1. isNumericSpace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3746
    }
3747
3748
    /**
3749
     * <p>Checks if the CharSequence contains only whitespace.</p>
3750
     *
3751
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3752
     *
3753
     * <p>{@code null} will return {@code false}.
3754
     * An empty CharSequence (length()=0) will return {@code true}.</p>
3755
     *
3756
     * <pre>
3757
     * StringUtils.isWhitespace(null)   = false
3758
     * StringUtils.isWhitespace("")     = true
3759
     * StringUtils.isWhitespace("  ")   = true
3760
     * StringUtils.isWhitespace("abc")  = false
3761
     * StringUtils.isWhitespace("ab2c") = false
3762
     * StringUtils.isWhitespace("ab-c") = false
3763
     * </pre>
3764
     *
3765
     * @param cs  the CharSequence to check, may be null
3766
     * @return {@code true} if only contains whitespace, and is non-null
3767
     * @since 2.0
3768
     * @since 3.0 Changed signature from isWhitespace(String) to isWhitespace(CharSequence)
3769
     */
3770
    public static boolean isWhitespace(final CharSequence cs) {
3771 1 1. isWhitespace : negated conditional → KILLED
        if (cs == null) {
3772 1 1. isWhitespace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
3773
        }
3774
        final int sz = cs.length();
3775 3 1. isWhitespace : changed conditional boundary → KILLED
2. isWhitespace : Changed increment from 1 to -1 → KILLED
3. isWhitespace : negated conditional → KILLED
        for (int i = 0; i < sz; i++) {
3776 1 1. isWhitespace : negated conditional → KILLED
            if (!Character.isWhitespace(cs.charAt(i))) {
3777 1 1. isWhitespace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return false;
3778
            }
3779
        }
3780 1 1. isWhitespace : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return true;
3781
    }
3782
3783
    /**
3784
     * <p>
3785
     * Joins the elements of the provided array into a single String containing the provided list of elements.
3786
     * </p>
3787
     *
3788
     * <p>
3789
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
3790
     * by empty strings.
3791
     * </p>
3792
     *
3793
     * <pre>
3794
     * StringUtils.join(null, *)               = null
3795
     * StringUtils.join([], *)                 = ""
3796
     * StringUtils.join([null], *)             = ""
3797
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
3798
     * StringUtils.join([1, 2, 3], null) = "123"
3799
     * </pre>
3800
     *
3801
     * @param array
3802
     *            the array of values to join together, may be null
3803
     * @param separator
3804
     *            the separator character to use
3805
     * @return the joined String, {@code null} if null array input
3806
     * @since 3.2
3807
     */
3808
    public static String join(final byte[] array, final char separator) {
3809 1 1. join : negated conditional → KILLED
        if (array == null) {
3810 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
3811
        }
3812 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
3813
    }
3814
3815
    /**
3816
     * <p>
3817
     * Joins the elements of the provided array into a single String containing the provided list of elements.
3818
     * </p>
3819
     *
3820
     * <p>
3821
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
3822
     * by empty strings.
3823
     * </p>
3824
     *
3825
     * <pre>
3826
     * StringUtils.join(null, *)               = null
3827
     * StringUtils.join([], *)                 = ""
3828
     * StringUtils.join([null], *)             = ""
3829
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
3830
     * StringUtils.join([1, 2, 3], null) = "123"
3831
     * </pre>
3832
     *
3833
     * @param array
3834
     *            the array of values to join together, may be null
3835
     * @param separator
3836
     *            the separator character to use
3837
     * @param startIndex
3838
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
3839
     *            array
3840
     * @param endIndex
3841
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
3842
     *            the array
3843
     * @return the joined String, {@code null} if null array input
3844
     * @since 3.2
3845
     */
3846
    public static String join(final byte[] array, final char separator, final int startIndex, final int endIndex) {
3847 1 1. join : negated conditional → KILLED
        if (array == null) {
3848 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
3849
        }
3850 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
3851 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
3852 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
3853
        }
3854
        final StringBuilder buf = newStringBuilder(noOfItems);
3855 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
3856 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
3857
                buf.append(separator);
3858
            }
3859
            buf.append(array[i]);
3860
        }
3861 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
3862
    }
3863
3864
    /**
3865
     * <p>
3866
     * Joins the elements of the provided array into a single String containing the provided list of elements.
3867
     * </p>
3868
     *
3869
     * <p>
3870
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
3871
     * by empty strings.
3872
     * </p>
3873
     *
3874
     * <pre>
3875
     * StringUtils.join(null, *)               = null
3876
     * StringUtils.join([], *)                 = ""
3877
     * StringUtils.join([null], *)             = ""
3878
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
3879
     * StringUtils.join([1, 2, 3], null) = "123"
3880
     * </pre>
3881
     *
3882
     * @param array
3883
     *            the array of values to join together, may be null
3884
     * @param separator
3885
     *            the separator character to use
3886
     * @return the joined String, {@code null} if null array input
3887
     * @since 3.2
3888
     */
3889
    public static String join(final char[] array, final char separator) {
3890 1 1. join : negated conditional → KILLED
        if (array == null) {
3891 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
3892
        }
3893 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
3894
    }
3895
3896
    /**
3897
     * <p>
3898
     * Joins the elements of the provided array into a single String containing the provided list of elements.
3899
     * </p>
3900
     *
3901
     * <p>
3902
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
3903
     * by empty strings.
3904
     * </p>
3905
     *
3906
     * <pre>
3907
     * StringUtils.join(null, *)               = null
3908
     * StringUtils.join([], *)                 = ""
3909
     * StringUtils.join([null], *)             = ""
3910
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
3911
     * StringUtils.join([1, 2, 3], null) = "123"
3912
     * </pre>
3913
     *
3914
     * @param array
3915
     *            the array of values to join together, may be null
3916
     * @param separator
3917
     *            the separator character to use
3918
     * @param startIndex
3919
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
3920
     *            array
3921
     * @param endIndex
3922
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
3923
     *            the array
3924
     * @return the joined String, {@code null} if null array input
3925
     * @since 3.2
3926
     */
3927
    public static String join(final char[] array, final char separator, final int startIndex, final int endIndex) {
3928 1 1. join : negated conditional → KILLED
        if (array == null) {
3929 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
3930
        }
3931 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
3932 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
3933 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
3934
        }
3935
        final StringBuilder buf = newStringBuilder(noOfItems);
3936 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
3937 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
3938
                buf.append(separator);
3939
            }
3940
            buf.append(array[i]);
3941
        }
3942 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
3943
    }
3944
3945
    /**
3946
     * <p>
3947
     * Joins the elements of the provided array into a single String containing the provided list of elements.
3948
     * </p>
3949
     *
3950
     * <p>
3951
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
3952
     * by empty strings.
3953
     * </p>
3954
     *
3955
     * <pre>
3956
     * StringUtils.join(null, *)               = null
3957
     * StringUtils.join([], *)                 = ""
3958
     * StringUtils.join([null], *)             = ""
3959
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
3960
     * StringUtils.join([1, 2, 3], null) = "123"
3961
     * </pre>
3962
     *
3963
     * @param array
3964
     *            the array of values to join together, may be null
3965
     * @param separator
3966
     *            the separator character to use
3967
     * @return the joined String, {@code null} if null array input
3968
     * @since 3.2
3969
     */
3970
    public static String join(final double[] array, final char separator) {
3971 1 1. join : negated conditional → KILLED
        if (array == null) {
3972 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
3973
        }
3974 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
3975
    }
3976
3977
    /**
3978
     * <p>
3979
     * Joins the elements of the provided array into a single String containing the provided list of elements.
3980
     * </p>
3981
     *
3982
     * <p>
3983
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
3984
     * by empty strings.
3985
     * </p>
3986
     *
3987
     * <pre>
3988
     * StringUtils.join(null, *)               = null
3989
     * StringUtils.join([], *)                 = ""
3990
     * StringUtils.join([null], *)             = ""
3991
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
3992
     * StringUtils.join([1, 2, 3], null) = "123"
3993
     * </pre>
3994
     *
3995
     * @param array
3996
     *            the array of values to join together, may be null
3997
     * @param separator
3998
     *            the separator character to use
3999
     * @param startIndex
4000
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
4001
     *            array
4002
     * @param endIndex
4003
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
4004
     *            the array
4005
     * @return the joined String, {@code null} if null array input
4006
     * @since 3.2
4007
     */
4008
    public static String join(final double[] array, final char separator, final int startIndex, final int endIndex) {
4009 1 1. join : negated conditional → KILLED
        if (array == null) {
4010 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4011
        }
4012 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4013 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4014 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4015
        }
4016
        final StringBuilder buf = newStringBuilder(noOfItems);
4017 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4018 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4019
                buf.append(separator);
4020
            }
4021
            buf.append(array[i]);
4022
        }
4023 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4024
    }
4025
4026
    /**
4027
     * <p>
4028
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4029
     * </p>
4030
     *
4031
     * <p>
4032
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4033
     * by empty strings.
4034
     * </p>
4035
     *
4036
     * <pre>
4037
     * StringUtils.join(null, *)               = null
4038
     * StringUtils.join([], *)                 = ""
4039
     * StringUtils.join([null], *)             = ""
4040
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4041
     * StringUtils.join([1, 2, 3], null) = "123"
4042
     * </pre>
4043
     *
4044
     * @param array
4045
     *            the array of values to join together, may be null
4046
     * @param separator
4047
     *            the separator character to use
4048
     * @return the joined String, {@code null} if null array input
4049
     * @since 3.2
4050
     */
4051
    public static String join(final float[] array, final char separator) {
4052 1 1. join : negated conditional → KILLED
        if (array == null) {
4053 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4054
        }
4055 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
4056
    }
4057
4058
    /**
4059
     * <p>
4060
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4061
     * </p>
4062
     *
4063
     * <p>
4064
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4065
     * by empty strings.
4066
     * </p>
4067
     *
4068
     * <pre>
4069
     * StringUtils.join(null, *)               = null
4070
     * StringUtils.join([], *)                 = ""
4071
     * StringUtils.join([null], *)             = ""
4072
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4073
     * StringUtils.join([1, 2, 3], null) = "123"
4074
     * </pre>
4075
     *
4076
     * @param array
4077
     *            the array of values to join together, may be null
4078
     * @param separator
4079
     *            the separator character to use
4080
     * @param startIndex
4081
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
4082
     *            array
4083
     * @param endIndex
4084
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
4085
     *            the array
4086
     * @return the joined String, {@code null} if null array input
4087
     * @since 3.2
4088
     */
4089
    public static String join(final float[] array, final char separator, final int startIndex, final int endIndex) {
4090 1 1. join : negated conditional → KILLED
        if (array == null) {
4091 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4092
        }
4093 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4094 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4095 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4096
        }
4097
        final StringBuilder buf = newStringBuilder(noOfItems);
4098 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4099 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4100
                buf.append(separator);
4101
            }
4102
            buf.append(array[i]);
4103
        }
4104 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4105
    }
4106
4107
    /**
4108
     * <p>
4109
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4110
     * </p>
4111
     *
4112
     * <p>
4113
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4114
     * by empty strings.
4115
     * </p>
4116
     *
4117
     * <pre>
4118
     * StringUtils.join(null, *)               = null
4119
     * StringUtils.join([], *)                 = ""
4120
     * StringUtils.join([null], *)             = ""
4121
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4122
     * StringUtils.join([1, 2, 3], null) = "123"
4123
     * </pre>
4124
     *
4125
     * @param array
4126
     *            the array of values to join together, may be null
4127
     * @param separator
4128
     *            the separator character to use
4129
     * @return the joined String, {@code null} if null array input
4130
     * @since 3.2
4131
     */
4132
    public static String join(final int[] array, final char separator) {
4133 1 1. join : negated conditional → KILLED
        if (array == null) {
4134 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4135
        }
4136 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
4137
    }
4138
4139
    /**
4140
     * <p>
4141
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4142
     * </p>
4143
     *
4144
     * <p>
4145
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4146
     * by empty strings.
4147
     * </p>
4148
     *
4149
     * <pre>
4150
     * StringUtils.join(null, *)               = null
4151
     * StringUtils.join([], *)                 = ""
4152
     * StringUtils.join([null], *)             = ""
4153
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4154
     * StringUtils.join([1, 2, 3], null) = "123"
4155
     * </pre>
4156
     *
4157
     * @param array
4158
     *            the array of values to join together, may be null
4159
     * @param separator
4160
     *            the separator character to use
4161
     * @param startIndex
4162
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
4163
     *            array
4164
     * @param endIndex
4165
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
4166
     *            the array
4167
     * @return the joined String, {@code null} if null array input
4168
     * @since 3.2
4169
     */
4170
    public static String join(final int[] array, final char separator, final int startIndex, final int endIndex) {
4171 1 1. join : negated conditional → KILLED
        if (array == null) {
4172 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4173
        }
4174 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4175 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4176 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4177
        }
4178
        final StringBuilder buf = newStringBuilder(noOfItems);
4179 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4180 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4181
                buf.append(separator);
4182
            }
4183
            buf.append(array[i]);
4184
        }
4185 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4186
    }
4187
4188
    /**
4189
     * <p>Joins the elements of the provided {@code Iterable} into
4190
     * a single String containing the provided elements.</p>
4191
     *
4192
     * <p>No delimiter is added before or after the list. Null objects or empty
4193
     * strings within the iteration are represented by empty strings.</p>
4194
     *
4195
     * <p>See the examples here: {@link #join(Object[],char)}. </p>
4196
     *
4197
     * @param iterable  the {@code Iterable} providing the values to join together, may be null
4198
     * @param separator  the separator character to use
4199
     * @return the joined String, {@code null} if null iterator input
4200
     * @since 2.3
4201
     */
4202
    public static String join(final Iterable<?> iterable, final char separator) {
4203 1 1. join : negated conditional → KILLED
        if (iterable == null) {
4204 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4205
        }
4206 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(iterable.iterator(), separator);
4207
    }
4208
4209
    /**
4210
     * <p>Joins the elements of the provided {@code Iterable} into
4211
     * a single String containing the provided elements.</p>
4212
     *
4213
     * <p>No delimiter is added before or after the list.
4214
     * A {@code null} separator is the same as an empty String ("").</p>
4215
     *
4216
     * <p>See the examples here: {@link #join(Object[],String)}. </p>
4217
     *
4218
     * @param iterable  the {@code Iterable} providing the values to join together, may be null
4219
     * @param separator  the separator character to use, null treated as ""
4220
     * @return the joined String, {@code null} if null iterator input
4221
     * @since 2.3
4222
     */
4223
    public static String join(final Iterable<?> iterable, final String separator) {
4224 1 1. join : negated conditional → KILLED
        if (iterable == null) {
4225 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4226
        }
4227 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(iterable.iterator(), separator);
4228
    }
4229
4230
    /**
4231
     * <p>Joins the elements of the provided {@code Iterator} into
4232
     * a single String containing the provided elements.</p>
4233
     *
4234
     * <p>No delimiter is added before or after the list. Null objects or empty
4235
     * strings within the iteration are represented by empty strings.</p>
4236
     *
4237
     * <p>See the examples here: {@link #join(Object[],char)}. </p>
4238
     *
4239
     * @param iterator  the {@code Iterator} of values to join together, may be null
4240
     * @param separator  the separator character to use
4241
     * @return the joined String, {@code null} if null iterator input
4242
     * @since 2.0
4243
     */
4244
    public static String join(final Iterator<?> iterator, final char separator) {
4245
4246
        // handle null, zero and one elements before building a buffer
4247 1 1. join : negated conditional → KILLED
        if (iterator == null) {
4248 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4249
        }
4250 1 1. join : negated conditional → KILLED
        if (!iterator.hasNext()) {
4251 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4252
        }
4253
        final Object first = iterator.next();
4254 1 1. join : negated conditional → KILLED
        if (!iterator.hasNext()) {
4255 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return Objects.toString(first, EMPTY);
4256
        }
4257
4258
        // two or more elements
4259
        final StringBuilder buf = new StringBuilder(STRING_BUILDER_SIZE); // Java default is 16, probably too small
4260 1 1. join : negated conditional → KILLED
        if (first != null) {
4261
            buf.append(first);
4262
        }
4263
4264 1 1. join : negated conditional → KILLED
        while (iterator.hasNext()) {
4265
            buf.append(separator);
4266
            final Object obj = iterator.next();
4267 1 1. join : negated conditional → KILLED
            if (obj != null) {
4268
                buf.append(obj);
4269
            }
4270
        }
4271
4272 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4273
    }
4274
4275
    /**
4276
     * <p>Joins the elements of the provided {@code Iterator} into
4277
     * a single String containing the provided elements.</p>
4278
     *
4279
     * <p>No delimiter is added before or after the list.
4280
     * A {@code null} separator is the same as an empty String ("").</p>
4281
     *
4282
     * <p>See the examples here: {@link #join(Object[],String)}. </p>
4283
     *
4284
     * @param iterator  the {@code Iterator} of values to join together, may be null
4285
     * @param separator  the separator character to use, null treated as ""
4286
     * @return the joined String, {@code null} if null iterator input
4287
     */
4288
    public static String join(final Iterator<?> iterator, final String separator) {
4289
4290
        // handle null, zero and one elements before building a buffer
4291 1 1. join : negated conditional → KILLED
        if (iterator == null) {
4292 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4293
        }
4294 1 1. join : negated conditional → KILLED
        if (!iterator.hasNext()) {
4295 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4296
        }
4297
        final Object first = iterator.next();
4298 1 1. join : negated conditional → KILLED
        if (!iterator.hasNext()) {
4299 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return Objects.toString(first, "");
4300
        }
4301
4302
        // two or more elements
4303
        final StringBuilder buf = new StringBuilder(STRING_BUILDER_SIZE); // Java default is 16, probably too small
4304 1 1. join : negated conditional → KILLED
        if (first != null) {
4305
            buf.append(first);
4306
        }
4307
4308 1 1. join : negated conditional → KILLED
        while (iterator.hasNext()) {
4309 1 1. join : negated conditional → KILLED
            if (separator != null) {
4310
                buf.append(separator);
4311
            }
4312
            final Object obj = iterator.next();
4313 1 1. join : negated conditional → KILLED
            if (obj != null) {
4314
                buf.append(obj);
4315
            }
4316
        }
4317 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4318
    }
4319
4320
    /**
4321
     * <p>Joins the elements of the provided {@code List} into a single String
4322
     * containing the provided list of elements.</p>
4323
     *
4324
     * <p>No delimiter is added before or after the list.
4325
     * Null objects or empty strings within the array are represented by
4326
     * empty strings.</p>
4327
     *
4328
     * <pre>
4329
     * StringUtils.join(null, *)               = null
4330
     * StringUtils.join([], *)                 = ""
4331
     * StringUtils.join([null], *)             = ""
4332
     * StringUtils.join(["a", "b", "c"], ';')  = "a;b;c"
4333
     * StringUtils.join(["a", "b", "c"], null) = "abc"
4334
     * StringUtils.join([null, "", "a"], ';')  = ";;a"
4335
     * </pre>
4336
     *
4337
     * @param list  the {@code List} of values to join together, may be null
4338
     * @param separator  the separator character to use
4339
     * @param startIndex the first index to start joining from.  It is
4340
     * an error to pass in a start index past the end of the list
4341
     * @param endIndex the index to stop joining from (exclusive). It is
4342
     * an error to pass in an end index past the end of the list
4343
     * @return the joined String, {@code null} if null list input
4344
     * @since 3.8
4345
     */
4346
    public static String join(final List<?> list, final char separator, final int startIndex, final int endIndex) {
4347 1 1. join : negated conditional → KILLED
        if (list == null) {
4348 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4349
        }
4350 1 1. join : Replaced integer subtraction with addition → KILLED
        final int noOfItems = endIndex - startIndex;
4351 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4352 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4353
        }
4354
        final List<?> subList = list.subList(startIndex, endIndex);
4355 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(subList.iterator(), separator);
4356
    }
4357
4358
    /**
4359
     * <p>Joins the elements of the provided {@code List} into a single String
4360
     * containing the provided list of elements.</p>
4361
     *
4362
     * <p>No delimiter is added before or after the list.
4363
     * Null objects or empty strings within the array are represented by
4364
     * empty strings.</p>
4365
     *
4366
     * <pre>
4367
     * StringUtils.join(null, *)               = null
4368
     * StringUtils.join([], *)                 = ""
4369
     * StringUtils.join([null], *)             = ""
4370
     * StringUtils.join(["a", "b", "c"], ';')  = "a;b;c"
4371
     * StringUtils.join(["a", "b", "c"], null) = "abc"
4372
     * StringUtils.join([null, "", "a"], ';')  = ";;a"
4373
     * </pre>
4374
     *
4375
     * @param list  the {@code List} of values to join together, may be null
4376
     * @param separator  the separator character to use
4377
     * @param startIndex the first index to start joining from.  It is
4378
     * an error to pass in a start index past the end of the list
4379
     * @param endIndex the index to stop joining from (exclusive). It is
4380
     * an error to pass in an end index past the end of the list
4381
     * @return the joined String, {@code null} if null list input
4382
     * @since 3.8
4383
     */
4384
    public static String join(final List<?> list, final String separator, final int startIndex, final int endIndex) {
4385 1 1. join : negated conditional → KILLED
        if (list == null) {
4386 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4387
        }
4388 1 1. join : Replaced integer subtraction with addition → KILLED
        final int noOfItems = endIndex - startIndex;
4389 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4390 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4391
        }
4392
        final List<?> subList = list.subList(startIndex, endIndex);
4393 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(subList.iterator(), separator);
4394
    }
4395
4396
    /**
4397
     * <p>
4398
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4399
     * </p>
4400
     *
4401
     * <p>
4402
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4403
     * by empty strings.
4404
     * </p>
4405
     *
4406
     * <pre>
4407
     * StringUtils.join(null, *)               = null
4408
     * StringUtils.join([], *)                 = ""
4409
     * StringUtils.join([null], *)             = ""
4410
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4411
     * StringUtils.join([1, 2, 3], null) = "123"
4412
     * </pre>
4413
     *
4414
     * @param array
4415
     *            the array of values to join together, may be null
4416
     * @param separator
4417
     *            the separator character to use
4418
     * @return the joined String, {@code null} if null array input
4419
     * @since 3.2
4420
     */
4421
    public static String join(final long[] array, final char separator) {
4422 1 1. join : negated conditional → KILLED
        if (array == null) {
4423 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4424
        }
4425 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
4426
    }
4427
4428
4429
    /**
4430
     * <p>
4431
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4432
     * </p>
4433
     *
4434
     * <p>
4435
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4436
     * by empty strings.
4437
     * </p>
4438
     *
4439
     * <pre>
4440
     * StringUtils.join(null, *)               = null
4441
     * StringUtils.join([], *)                 = ""
4442
     * StringUtils.join([null], *)             = ""
4443
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4444
     * StringUtils.join([1, 2, 3], null) = "123"
4445
     * </pre>
4446
     *
4447
     * @param array
4448
     *            the array of values to join together, may be null
4449
     * @param separator
4450
     *            the separator character to use
4451
     * @param startIndex
4452
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
4453
     *            array
4454
     * @param endIndex
4455
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
4456
     *            the array
4457
     * @return the joined String, {@code null} if null array input
4458
     * @since 3.2
4459
     */
4460
    public static String join(final long[] array, final char separator, final int startIndex, final int endIndex) {
4461 1 1. join : negated conditional → KILLED
        if (array == null) {
4462 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4463
        }
4464 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4465 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4466 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4467
        }
4468
        final StringBuilder buf = newStringBuilder(noOfItems);
4469 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4470 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4471
                buf.append(separator);
4472
            }
4473
            buf.append(array[i]);
4474
        }
4475 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4476
    }
4477
4478
    /**
4479
     * <p>Joins the elements of the provided array into a single String
4480
     * containing the provided list of elements.</p>
4481
     *
4482
     * <p>No delimiter is added before or after the list.
4483
     * Null objects or empty strings within the array are represented by
4484
     * empty strings.</p>
4485
     *
4486
     * <pre>
4487
     * StringUtils.join(null, *)               = null
4488
     * StringUtils.join([], *)                 = ""
4489
     * StringUtils.join([null], *)             = ""
4490
     * StringUtils.join(["a", "b", "c"], ';')  = "a;b;c"
4491
     * StringUtils.join(["a", "b", "c"], null) = "abc"
4492
     * StringUtils.join([null, "", "a"], ';')  = ";;a"
4493
     * </pre>
4494
     *
4495
     * @param array  the array of values to join together, may be null
4496
     * @param separator  the separator character to use
4497
     * @return the joined String, {@code null} if null array input
4498
     * @since 2.0
4499
     */
4500
    public static String join(final Object[] array, final char separator) {
4501 1 1. join : negated conditional → KILLED
        if (array == null) {
4502 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4503
        }
4504 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
4505
    }
4506
4507
    /**
4508
     * <p>Joins the elements of the provided array into a single String
4509
     * containing the provided list of elements.</p>
4510
     *
4511
     * <p>No delimiter is added before or after the list.
4512
     * Null objects or empty strings within the array are represented by
4513
     * empty strings.</p>
4514
     *
4515
     * <pre>
4516
     * StringUtils.join(null, *)               = null
4517
     * StringUtils.join([], *)                 = ""
4518
     * StringUtils.join([null], *)             = ""
4519
     * StringUtils.join(["a", "b", "c"], ';')  = "a;b;c"
4520
     * StringUtils.join(["a", "b", "c"], null) = "abc"
4521
     * StringUtils.join([null, "", "a"], ';')  = ";;a"
4522
     * </pre>
4523
     *
4524
     * @param array  the array of values to join together, may be null
4525
     * @param separator  the separator character to use
4526
     * @param startIndex the first index to start joining from.  It is
4527
     * an error to pass in a start index past the end of the array
4528
     * @param endIndex the index to stop joining from (exclusive). It is
4529
     * an error to pass in an end index past the end of the array
4530
     * @return the joined String, {@code null} if null array input
4531
     * @since 2.0
4532
     */
4533
    public static String join(final Object[] array, final char separator, final int startIndex, final int endIndex) {
4534 1 1. join : negated conditional → KILLED
        if (array == null) {
4535 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4536
        }
4537 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4538 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4539 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4540
        }
4541
        final StringBuilder buf = newStringBuilder(noOfItems);
4542 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4543 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4544
                buf.append(separator);
4545
            }
4546 1 1. join : negated conditional → KILLED
            if (array[i] != null) {
4547
                buf.append(array[i]);
4548
            }
4549
        }
4550 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4551
    }
4552
4553
    /**
4554
     * <p>Joins the elements of the provided array into a single String
4555
     * containing the provided list of elements.</p>
4556
     *
4557
     * <p>No delimiter is added before or after the list.
4558
     * A {@code null} separator is the same as an empty String ("").
4559
     * Null objects or empty strings within the array are represented by
4560
     * empty strings.</p>
4561
     *
4562
     * <pre>
4563
     * StringUtils.join(null, *)                = null
4564
     * StringUtils.join([], *)                  = ""
4565
     * StringUtils.join([null], *)              = ""
4566
     * StringUtils.join(["a", "b", "c"], "--")  = "a--b--c"
4567
     * StringUtils.join(["a", "b", "c"], null)  = "abc"
4568
     * StringUtils.join(["a", "b", "c"], "")    = "abc"
4569
     * StringUtils.join([null, "", "a"], ',')   = ",,a"
4570
     * </pre>
4571
     *
4572
     * @param array  the array of values to join together, may be null
4573
     * @param separator  the separator character to use, null treated as ""
4574
     * @return the joined String, {@code null} if null array input
4575
     */
4576
    public static String join(final Object[] array, final String separator) {
4577 1 1. join : negated conditional → KILLED
        if (array == null) {
4578 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4579
        }
4580 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
4581
    }
4582
4583
    /**
4584
     * <p>Joins the elements of the provided array into a single String
4585
     * containing the provided list of elements.</p>
4586
     *
4587
     * <p>No delimiter is added before or after the list.
4588
     * A {@code null} separator is the same as an empty String ("").
4589
     * Null objects or empty strings within the array are represented by
4590
     * empty strings.</p>
4591
     *
4592
     * <pre>
4593
     * StringUtils.join(null, *, *, *)                = null
4594
     * StringUtils.join([], *, *, *)                  = ""
4595
     * StringUtils.join([null], *, *, *)              = ""
4596
     * StringUtils.join(["a", "b", "c"], "--", 0, 3)  = "a--b--c"
4597
     * StringUtils.join(["a", "b", "c"], "--", 1, 3)  = "b--c"
4598
     * StringUtils.join(["a", "b", "c"], "--", 2, 3)  = "c"
4599
     * StringUtils.join(["a", "b", "c"], "--", 2, 2)  = ""
4600
     * StringUtils.join(["a", "b", "c"], null, 0, 3)  = "abc"
4601
     * StringUtils.join(["a", "b", "c"], "", 0, 3)    = "abc"
4602
     * StringUtils.join([null, "", "a"], ',', 0, 3)   = ",,a"
4603
     * </pre>
4604
     *
4605
     * @param array  the array of values to join together, may be null
4606
     * @param separator  the separator character to use, null treated as ""
4607
     * @param startIndex the first index to start joining from.
4608
     * @param endIndex the index to stop joining from (exclusive).
4609
     * @return the joined String, {@code null} if null array input; or the empty string
4610
     * if {@code endIndex - startIndex <= 0}. The number of joined entries is given by
4611
     * {@code endIndex - startIndex}
4612
     * @throws ArrayIndexOutOfBoundsException ife<br>
4613
     * {@code startIndex < 0} or <br>
4614
     * {@code startIndex >= array.length()} or <br>
4615
     * {@code endIndex < 0} or <br>
4616
     * {@code endIndex > array.length()}
4617
     */
4618
    public static String join(final Object[] array, String separator, final int startIndex, final int endIndex) {
4619 1 1. join : negated conditional → KILLED
        if (array == null) {
4620 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return null;
4621
        }
4622 1 1. join : negated conditional → KILLED
        if (separator == null) {
4623
            separator = EMPTY;
4624
        }
4625
4626
        // endIndex - startIndex > 0:   Len = NofStrings *(len(firstString) + len(separator))
4627
        //           (Assuming that all Strings are roughly equally long)
4628 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4629 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4630 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4631
        }
4632
4633
        final StringBuilder buf = newStringBuilder(noOfItems);
4634
4635 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4636 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4637
                buf.append(separator);
4638
            }
4639 1 1. join : negated conditional → KILLED
            if (array[i] != null) {
4640
                buf.append(array[i]);
4641
            }
4642
        }
4643 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4644
    }
4645
4646
    /**
4647
     * <p>
4648
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4649
     * </p>
4650
     *
4651
     * <p>
4652
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4653
     * by empty strings.
4654
     * </p>
4655
     *
4656
     * <pre>
4657
     * StringUtils.join(null, *)               = null
4658
     * StringUtils.join([], *)                 = ""
4659
     * StringUtils.join([null], *)             = ""
4660
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4661
     * StringUtils.join([1, 2, 3], null) = "123"
4662
     * </pre>
4663
     *
4664
     * @param array
4665
     *            the array of values to join together, may be null
4666
     * @param separator
4667
     *            the separator character to use
4668
     * @return the joined String, {@code null} if null array input
4669
     * @since 3.2
4670
     */
4671
    public static String join(final short[] array, final char separator) {
4672 1 1. join : negated conditional → KILLED
        if (array == null) {
4673 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4674
        }
4675 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(array, separator, 0, array.length);
4676
    }
4677
4678
    /**
4679
     * <p>
4680
     * Joins the elements of the provided array into a single String containing the provided list of elements.
4681
     * </p>
4682
     *
4683
     * <p>
4684
     * No delimiter is added before or after the list. Null objects or empty strings within the array are represented
4685
     * by empty strings.
4686
     * </p>
4687
     *
4688
     * <pre>
4689
     * StringUtils.join(null, *)               = null
4690
     * StringUtils.join([], *)                 = ""
4691
     * StringUtils.join([null], *)             = ""
4692
     * StringUtils.join([1, 2, 3], ';')  = "1;2;3"
4693
     * StringUtils.join([1, 2, 3], null) = "123"
4694
     * </pre>
4695
     *
4696
     * @param array
4697
     *            the array of values to join together, may be null
4698
     * @param separator
4699
     *            the separator character to use
4700
     * @param startIndex
4701
     *            the first index to start joining from. It is an error to pass in a start index past the end of the
4702
     *            array
4703
     * @param endIndex
4704
     *            the index to stop joining from (exclusive). It is an error to pass in an end index past the end of
4705
     *            the array
4706
     * @return the joined String, {@code null} if null array input
4707
     * @since 3.2
4708
     */
4709
    public static String join(final short[] array, final char separator, final int startIndex, final int endIndex) {
4710 1 1. join : negated conditional → KILLED
        if (array == null) {
4711 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
4712
        }
4713 1 1. join : Replaced integer subtraction with addition → SURVIVED
        final int noOfItems = endIndex - startIndex;
4714 2 1. join : changed conditional boundary → SURVIVED
2. join : negated conditional → KILLED
        if (noOfItems <= 0) {
4715 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
4716
        }
4717
        final StringBuilder buf = newStringBuilder(noOfItems);
4718 3 1. join : changed conditional boundary → KILLED
2. join : Changed increment from 1 to -1 → KILLED
3. join : negated conditional → KILLED
        for (int i = startIndex; i < endIndex; i++) {
4719 2 1. join : changed conditional boundary → KILLED
2. join : negated conditional → KILLED
            if (i > startIndex) {
4720
                buf.append(separator);
4721
            }
4722
            buf.append(array[i]);
4723
        }
4724 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return buf.toString();
4725
    }
4726
4727
    // Joining
4728
    //-----------------------------------------------------------------------
4729
    /**
4730
     * <p>Joins the elements of the provided array into a single String
4731
     * containing the provided list of elements.</p>
4732
     *
4733
     * <p>No separator is added to the joined String.
4734
     * Null objects or empty strings within the array are represented by
4735
     * empty strings.</p>
4736
     *
4737
     * <pre>
4738
     * StringUtils.join(null)            = null
4739
     * StringUtils.join([])              = ""
4740
     * StringUtils.join([null])          = ""
4741
     * StringUtils.join(["a", "b", "c"]) = "abc"
4742
     * StringUtils.join([null, "", "a"]) = "a"
4743
     * </pre>
4744
     *
4745
     * @param <T> the specific type of values to join together
4746
     * @param elements  the values to join together, may be null
4747
     * @return the joined String, {@code null} if null array input
4748
     * @since 2.0
4749
     * @since 3.0 Changed signature to use varargs
4750
     */
4751
    @SafeVarargs
4752
    public static <T> String join(final T... elements) {
4753 1 1. join : mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(elements, null);
4754
    }
4755
4756
4757
    /**
4758
     * <p>Joins the elements of the provided varargs into a
4759
     * single String containing the provided elements.</p>
4760
     *
4761
     * <p>No delimiter is added before or after the list.
4762
     * {@code null} elements and separator are treated as empty Strings ("").</p>
4763
     *
4764
     * <pre>
4765
     * StringUtils.joinWith(",", {"a", "b"})        = "a,b"
4766
     * StringUtils.joinWith(",", {"a", "b",""})     = "a,b,"
4767
     * StringUtils.joinWith(",", {"a", null, "b"})  = "a,,b"
4768
     * StringUtils.joinWith(null, {"a", "b"})       = "ab"
4769
     * </pre>
4770
     *
4771
     * @param separator the separator character to use, null treated as ""
4772
     * @param objects the varargs providing the values to join together. {@code null} elements are treated as ""
4773
     * @return the joined String.
4774
     * @throws java.lang.IllegalArgumentException if a null varargs is provided
4775
     * @since 3.5
4776
     */
4777
    public static String joinWith(final String separator, final Object... objects) {
4778 1 1. joinWith : negated conditional → KILLED
        if (objects == null) {
4779
            throw new IllegalArgumentException("Object varargs must not be null");
4780
        }
4781
4782
        final String sanitizedSeparator = defaultString(separator);
4783
4784
        final StringBuilder result = new StringBuilder();
4785
4786
        final Iterator<Object> iterator = Arrays.asList(objects).iterator();
4787 1 1. joinWith : negated conditional → KILLED
        while (iterator.hasNext()) {
4788
            final String value = Objects.toString(iterator.next(), "");
4789
            result.append(value);
4790
4791 1 1. joinWith : negated conditional → KILLED
            if (iterator.hasNext()) {
4792
                result.append(sanitizedSeparator);
4793
            }
4794
        }
4795
4796 1 1. joinWith : mutated return of Object value for org/apache/commons/lang3/StringUtils::joinWith to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return result.toString();
4797
    }
4798
4799
    /**
4800
     * <p>Finds the last index within a CharSequence, handling {@code null}.
4801
     * This method uses {@link String#lastIndexOf(String)} if possible.</p>
4802
     *
4803
     * <p>A {@code null} CharSequence will return {@code -1}.</p>
4804
     *
4805
     * <pre>
4806
     * StringUtils.lastIndexOf(null, *)          = -1
4807
     * StringUtils.lastIndexOf(*, null)          = -1
4808
     * StringUtils.lastIndexOf("", "")           = 0
4809
     * StringUtils.lastIndexOf("aabaabaa", "a")  = 7
4810
     * StringUtils.lastIndexOf("aabaabaa", "b")  = 5
4811
     * StringUtils.lastIndexOf("aabaabaa", "ab") = 4
4812
     * StringUtils.lastIndexOf("aabaabaa", "")   = 8
4813
     * </pre>
4814
     *
4815
     * @param seq  the CharSequence to check, may be null
4816
     * @param searchSeq  the CharSequence to find, may be null
4817
     * @return the last index of the search String,
4818
     *  -1 if no match or {@code null} string input
4819
     * @since 2.0
4820
     * @since 3.0 Changed signature from lastIndexOf(String, String) to lastIndexOf(CharSequence, CharSequence)
4821
     */
4822
    public static int lastIndexOf(final CharSequence seq, final CharSequence searchSeq) {
4823 2 1. lastIndexOf : negated conditional → KILLED
2. lastIndexOf : negated conditional → KILLED
        if (seq == null || searchSeq == null) {
4824 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
4825
        }
4826 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.lastIndexOf(seq, searchSeq, seq.length());
4827
    }
4828
4829
    /**
4830
     * <p>Finds the last index within a CharSequence, handling {@code null}.
4831
     * This method uses {@link String#lastIndexOf(String, int)} if possible.</p>
4832
     *
4833
     * <p>A {@code null} CharSequence will return {@code -1}.
4834
     * A negative start position returns {@code -1}.
4835
     * An empty ("") search CharSequence always matches unless the start position is negative.
4836
     * A start position greater than the string length searches the whole string.
4837
     * The search starts at the startPos and works backwards; matches starting after the start
4838
     * position are ignored.
4839
     * </p>
4840
     *
4841
     * <pre>
4842
     * StringUtils.lastIndexOf(null, *, *)          = -1
4843
     * StringUtils.lastIndexOf(*, null, *)          = -1
4844
     * StringUtils.lastIndexOf("aabaabaa", "a", 8)  = 7
4845
     * StringUtils.lastIndexOf("aabaabaa", "b", 8)  = 5
4846
     * StringUtils.lastIndexOf("aabaabaa", "ab", 8) = 4
4847
     * StringUtils.lastIndexOf("aabaabaa", "b", 9)  = 5
4848
     * StringUtils.lastIndexOf("aabaabaa", "b", -1) = -1
4849
     * StringUtils.lastIndexOf("aabaabaa", "a", 0)  = 0
4850
     * StringUtils.lastIndexOf("aabaabaa", "b", 0)  = -1
4851
     * StringUtils.lastIndexOf("aabaabaa", "b", 1)  = -1
4852
     * StringUtils.lastIndexOf("aabaabaa", "b", 2)  = 2
4853
     * StringUtils.lastIndexOf("aabaabaa", "ba", 2)  = 2
4854
     * </pre>
4855
     *
4856
     * @param seq  the CharSequence to check, may be null
4857
     * @param searchSeq  the CharSequence to find, may be null
4858
     * @param startPos  the start position, negative treated as zero
4859
     * @return the last index of the search CharSequence (always &le; startPos),
4860
     *  -1 if no match or {@code null} string input
4861
     * @since 2.0
4862
     * @since 3.0 Changed signature from lastIndexOf(String, String, int) to lastIndexOf(CharSequence, CharSequence, int)
4863
     */
4864
    public static int lastIndexOf(final CharSequence seq, final CharSequence searchSeq, final int startPos) {
4865 2 1. lastIndexOf : negated conditional → KILLED
2. lastIndexOf : negated conditional → KILLED
        if (seq == null || searchSeq == null) {
4866 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
4867
        }
4868 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.lastIndexOf(seq, searchSeq, startPos);
4869
    }
4870
4871
    // LastIndexOf
4872
    //-----------------------------------------------------------------------
4873
    /**
4874
     * Returns the index within <code>seq</code> of the last occurrence of
4875
     * the specified character. For values of <code>searchChar</code> in the
4876
     * range from 0 to 0xFFFF (inclusive), the index (in Unicode code
4877
     * units) returned is the largest value <i>k</i> such that:
4878
     * <blockquote><pre>
4879
     * this.charAt(<i>k</i>) == searchChar
4880
     * </pre></blockquote>
4881
     * is true. For other values of <code>searchChar</code>, it is the
4882
     * largest value <i>k</i> such that:
4883
     * <blockquote><pre>
4884
     * this.codePointAt(<i>k</i>) == searchChar
4885
     * </pre></blockquote>
4886
     * is true.  In either case, if no such character occurs in this
4887
     * string, then <code>-1</code> is returned. Furthermore, a {@code null} or empty ("")
4888
     * <code>CharSequence</code> will return {@code -1}. The
4889
     * <code>seq</code> <code>CharSequence</code> object is searched backwards
4890
     * starting at the last character.
4891
     *
4892
     * <pre>
4893
     * StringUtils.lastIndexOf(null, *)         = -1
4894
     * StringUtils.lastIndexOf("", *)           = -1
4895
     * StringUtils.lastIndexOf("aabaabaa", 'a') = 7
4896
     * StringUtils.lastIndexOf("aabaabaa", 'b') = 5
4897
     * </pre>
4898
     *
4899
     * @param seq  the <code>CharSequence</code> to check, may be null
4900
     * @param searchChar  the character to find
4901
     * @return the last index of the search character,
4902
     *  -1 if no match or {@code null} string input
4903
     * @since 2.0
4904
     * @since 3.0 Changed signature from lastIndexOf(String, int) to lastIndexOf(CharSequence, int)
4905
     * @since 3.6 Updated {@link CharSequenceUtils} call to behave more like <code>String</code>
4906
     */
4907
    public static int lastIndexOf(final CharSequence seq, final int searchChar) {
4908 1 1. lastIndexOf : negated conditional → KILLED
        if (isEmpty(seq)) {
4909 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
4910
        }
4911 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.lastIndexOf(seq, searchChar, seq.length());
4912
    }
4913
4914
    /**
4915
     * Returns the index within <code>seq</code> of the last occurrence of
4916
     * the specified character, searching backward starting at the
4917
     * specified index. For values of <code>searchChar</code> in the range
4918
     * from 0 to 0xFFFF (inclusive), the index returned is the largest
4919
     * value <i>k</i> such that:
4920
     * <blockquote><pre>
4921
     * (this.charAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &lt;= startPos)
4922
     * </pre></blockquote>
4923
     * is true. For other values of <code>searchChar</code>, it is the
4924
     * largest value <i>k</i> such that:
4925
     * <blockquote><pre>
4926
     * (this.codePointAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &lt;= startPos)
4927
     * </pre></blockquote>
4928
     * is true. In either case, if no such character occurs in <code>seq</code>
4929
     * at or before position <code>startPos</code>, then
4930
     * <code>-1</code> is returned. Furthermore, a {@code null} or empty ("")
4931
     * <code>CharSequence</code> will return {@code -1}. A start position greater
4932
     * than the string length searches the whole string.
4933
     * The search starts at the <code>startPos</code> and works backwards;
4934
     * matches starting after the start position are ignored.
4935
     *
4936
     * <p>All indices are specified in <code>char</code> values
4937
     * (Unicode code units).
4938
     *
4939
     * <pre>
4940
     * StringUtils.lastIndexOf(null, *, *)          = -1
4941
     * StringUtils.lastIndexOf("", *,  *)           = -1
4942
     * StringUtils.lastIndexOf("aabaabaa", 'b', 8)  = 5
4943
     * StringUtils.lastIndexOf("aabaabaa", 'b', 4)  = 2
4944
     * StringUtils.lastIndexOf("aabaabaa", 'b', 0)  = -1
4945
     * StringUtils.lastIndexOf("aabaabaa", 'b', 9)  = 5
4946
     * StringUtils.lastIndexOf("aabaabaa", 'b', -1) = -1
4947
     * StringUtils.lastIndexOf("aabaabaa", 'a', 0)  = 0
4948
     * </pre>
4949
     *
4950
     * @param seq  the CharSequence to check, may be null
4951
     * @param searchChar  the character to find
4952
     * @param startPos  the start position
4953
     * @return the last index of the search character (always &le; startPos),
4954
     *  -1 if no match or {@code null} string input
4955
     * @since 2.0
4956
     * @since 3.0 Changed signature from lastIndexOf(String, int, int) to lastIndexOf(CharSequence, int, int)
4957
     */
4958
    public static int lastIndexOf(final CharSequence seq, final int searchChar, final int startPos) {
4959 1 1. lastIndexOf : negated conditional → KILLED
        if (isEmpty(seq)) {
4960 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
4961
        }
4962 1 1. lastIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.lastIndexOf(seq, searchChar, startPos);
4963
    }
4964
4965
    /**
4966
     * <p>Find the latest index of any of a set of potential substrings.</p>
4967
     *
4968
     * <p>A {@code null} CharSequence will return {@code -1}.
4969
     * A {@code null} search array will return {@code -1}.
4970
     * A {@code null} or zero length search array entry will be ignored,
4971
     * but a search array containing "" will return the length of {@code str}
4972
     * if {@code str} is not null. This method uses {@link String#indexOf(String)} if possible</p>
4973
     *
4974
     * <pre>
4975
     * StringUtils.lastIndexOfAny(null, *)                    = -1
4976
     * StringUtils.lastIndexOfAny(*, null)                    = -1
4977
     * StringUtils.lastIndexOfAny(*, [])                      = -1
4978
     * StringUtils.lastIndexOfAny(*, [null])                  = -1
4979
     * StringUtils.lastIndexOfAny("zzabyycdxx", ["ab", "cd"]) = 6
4980
     * StringUtils.lastIndexOfAny("zzabyycdxx", ["cd", "ab"]) = 6
4981
     * StringUtils.lastIndexOfAny("zzabyycdxx", ["mn", "op"]) = -1
4982
     * StringUtils.lastIndexOfAny("zzabyycdxx", ["mn", "op"]) = -1
4983
     * StringUtils.lastIndexOfAny("zzabyycdxx", ["mn", ""])   = 10
4984
     * </pre>
4985
     *
4986
     * @param str  the CharSequence to check, may be null
4987
     * @param searchStrs  the CharSequences to search for, may be null
4988
     * @return the last index of any of the CharSequences, -1 if no match
4989
     * @since 3.0 Changed signature from lastIndexOfAny(String, String[]) to lastIndexOfAny(CharSequence, CharSequence)
4990
     */
4991
    public static int lastIndexOfAny(final CharSequence str, final CharSequence... searchStrs) {
4992 2 1. lastIndexOfAny : negated conditional → KILLED
2. lastIndexOfAny : negated conditional → KILLED
        if (str == null || searchStrs == null) {
4993 1 1. lastIndexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
4994
        }
4995
        int ret = INDEX_NOT_FOUND;
4996
        int tmp = 0;
4997
        for (final CharSequence search : searchStrs) {
4998 1 1. lastIndexOfAny : negated conditional → KILLED
            if (search == null) {
4999
                continue;
5000
            }
5001
            tmp = CharSequenceUtils.lastIndexOf(str, search, str.length());
5002 2 1. lastIndexOfAny : changed conditional boundary → SURVIVED
2. lastIndexOfAny : negated conditional → KILLED
            if (tmp > ret) {
5003
                ret = tmp;
5004
            }
5005
        }
5006 1 1. lastIndexOfAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return ret;
5007
    }
5008
5009
    /**
5010
     * <p>Case in-sensitive find of the last index within a CharSequence.</p>
5011
     *
5012
     * <p>A {@code null} CharSequence will return {@code -1}.
5013
     * A negative start position returns {@code -1}.
5014
     * An empty ("") search CharSequence always matches unless the start position is negative.
5015
     * A start position greater than the string length searches the whole string.</p>
5016
     *
5017
     * <pre>
5018
     * StringUtils.lastIndexOfIgnoreCase(null, *)          = -1
5019
     * StringUtils.lastIndexOfIgnoreCase(*, null)          = -1
5020
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "A")  = 7
5021
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "B")  = 5
5022
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "AB") = 4
5023
     * </pre>
5024
     *
5025
     * @param str  the CharSequence to check, may be null
5026
     * @param searchStr  the CharSequence to find, may be null
5027
     * @return the first index of the search CharSequence,
5028
     *  -1 if no match or {@code null} string input
5029
     * @since 2.5
5030
     * @since 3.0 Changed signature from lastIndexOfIgnoreCase(String, String) to lastIndexOfIgnoreCase(CharSequence, CharSequence)
5031
     */
5032
    public static int lastIndexOfIgnoreCase(final CharSequence str, final CharSequence searchStr) {
5033 2 1. lastIndexOfIgnoreCase : negated conditional → KILLED
2. lastIndexOfIgnoreCase : negated conditional → KILLED
        if (str == null || searchStr == null) {
5034 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
5035
        }
5036 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return lastIndexOfIgnoreCase(str, searchStr, str.length());
5037
    }
5038
5039
    /**
5040
     * <p>Case in-sensitive find of the last index within a CharSequence
5041
     * from the specified position.</p>
5042
     *
5043
     * <p>A {@code null} CharSequence will return {@code -1}.
5044
     * A negative start position returns {@code -1}.
5045
     * An empty ("") search CharSequence always matches unless the start position is negative.
5046
     * A start position greater than the string length searches the whole string.
5047
     * The search starts at the startPos and works backwards; matches starting after the start
5048
     * position are ignored.
5049
     * </p>
5050
     *
5051
     * <pre>
5052
     * StringUtils.lastIndexOfIgnoreCase(null, *, *)          = -1
5053
     * StringUtils.lastIndexOfIgnoreCase(*, null, *)          = -1
5054
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "A", 8)  = 7
5055
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "B", 8)  = 5
5056
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "AB", 8) = 4
5057
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "B", 9)  = 5
5058
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "B", -1) = -1
5059
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "A", 0)  = 0
5060
     * StringUtils.lastIndexOfIgnoreCase("aabaabaa", "B", 0)  = -1
5061
     * </pre>
5062
     *
5063
     * @param str  the CharSequence to check, may be null
5064
     * @param searchStr  the CharSequence to find, may be null
5065
     * @param startPos  the start position
5066
     * @return the last index of the search CharSequence (always &le; startPos),
5067
     *  -1 if no match or {@code null} input
5068
     * @since 2.5
5069
     * @since 3.0 Changed signature from lastIndexOfIgnoreCase(String, String, int) to lastIndexOfIgnoreCase(CharSequence, CharSequence, int)
5070
     */
5071
    public static int lastIndexOfIgnoreCase(final CharSequence str, final CharSequence searchStr, int startPos) {
5072 2 1. lastIndexOfIgnoreCase : negated conditional → KILLED
2. lastIndexOfIgnoreCase : negated conditional → KILLED
        if (str == null || searchStr == null) {
5073 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
5074
        }
5075 3 1. lastIndexOfIgnoreCase : changed conditional boundary → SURVIVED
2. lastIndexOfIgnoreCase : Replaced integer subtraction with addition → SURVIVED
3. lastIndexOfIgnoreCase : negated conditional → KILLED
        if (startPos > str.length() - searchStr.length()) {
5076 1 1. lastIndexOfIgnoreCase : Replaced integer subtraction with addition → SURVIVED
            startPos = str.length() - searchStr.length();
5077
        }
5078 2 1. lastIndexOfIgnoreCase : changed conditional boundary → KILLED
2. lastIndexOfIgnoreCase : negated conditional → KILLED
        if (startPos < 0) {
5079 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
5080
        }
5081 1 1. lastIndexOfIgnoreCase : negated conditional → KILLED
        if (searchStr.length() == 0) {
5082 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return startPos;
5083
        }
5084
5085 3 1. lastIndexOfIgnoreCase : changed conditional boundary → KILLED
2. lastIndexOfIgnoreCase : Changed increment from -1 to 1 → KILLED
3. lastIndexOfIgnoreCase : negated conditional → KILLED
        for (int i = startPos; i >= 0; i--) {
5086 1 1. lastIndexOfIgnoreCase : negated conditional → KILLED
            if (CharSequenceUtils.regionMatches(str, true, i, searchStr, 0, searchStr.length())) {
5087 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return i;
5088
            }
5089
        }
5090 1 1. lastIndexOfIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return INDEX_NOT_FOUND;
5091
    }
5092
5093
    /**
5094
     * <p>Finds the n-th last index within a String, handling {@code null}.
5095
     * This method uses {@link String#lastIndexOf(String)}.</p>
5096
     *
5097
     * <p>A {@code null} String will return {@code -1}.</p>
5098
     *
5099
     * <pre>
5100
     * StringUtils.lastOrdinalIndexOf(null, *, *)          = -1
5101
     * StringUtils.lastOrdinalIndexOf(*, null, *)          = -1
5102
     * StringUtils.lastOrdinalIndexOf("", "", *)           = 0
5103
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "a", 1)  = 7
5104
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "a", 2)  = 6
5105
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "b", 1)  = 5
5106
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "b", 2)  = 2
5107
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "ab", 1) = 4
5108
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "ab", 2) = 1
5109
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "", 1)   = 8
5110
     * StringUtils.lastOrdinalIndexOf("aabaabaa", "", 2)   = 8
5111
     * </pre>
5112
     *
5113
     * <p>Note that 'tail(CharSequence str, int n)' may be implemented as: </p>
5114
     *
5115
     * <pre>
5116
     *   str.substring(lastOrdinalIndexOf(str, "\n", n) + 1)
5117
     * </pre>
5118
     *
5119
     * @param str  the CharSequence to check, may be null
5120
     * @param searchStr  the CharSequence to find, may be null
5121
     * @param ordinal  the n-th last {@code searchStr} to find
5122
     * @return the n-th last index of the search CharSequence,
5123
     *  {@code -1} ({@code INDEX_NOT_FOUND}) if no match or {@code null} string input
5124
     * @since 2.5
5125
     * @since 3.0 Changed signature from lastOrdinalIndexOf(String, String, int) to lastOrdinalIndexOf(CharSequence, CharSequence, int)
5126
     */
5127
    public static int lastOrdinalIndexOf(final CharSequence str, final CharSequence searchStr, final int ordinal) {
5128 1 1. lastOrdinalIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return ordinalIndexOf(str, searchStr, ordinal, true);
5129
    }
5130
5131
    // Left/Right/Mid
5132
    //-----------------------------------------------------------------------
5133
    /**
5134
     * <p>Gets the leftmost {@code len} characters of a String.</p>
5135
     *
5136
     * <p>If {@code len} characters are not available, or the
5137
     * String is {@code null}, the String will be returned without
5138
     * an exception. An empty String is returned if len is negative.</p>
5139
     *
5140
     * <pre>
5141
     * StringUtils.left(null, *)    = null
5142
     * StringUtils.left(*, -ve)     = ""
5143
     * StringUtils.left("", *)      = ""
5144
     * StringUtils.left("abc", 0)   = ""
5145
     * StringUtils.left("abc", 2)   = "ab"
5146
     * StringUtils.left("abc", 4)   = "abc"
5147
     * </pre>
5148
     *
5149
     * @param str  the String to get the leftmost characters from, may be null
5150
     * @param len  the length of the required String
5151
     * @return the leftmost characters, {@code null} if null String input
5152
     */
5153
    public static String left(final String str, final int len) {
5154 1 1. left : negated conditional → KILLED
        if (str == null) {
5155 1 1. left : mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5156
        }
5157 2 1. left : changed conditional boundary → SURVIVED
2. left : negated conditional → KILLED
        if (len < 0) {
5158 1 1. left : mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
5159
        }
5160 2 1. left : changed conditional boundary → SURVIVED
2. left : negated conditional → KILLED
        if (str.length() <= len) {
5161 1 1. left : mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5162
        }
5163 1 1. left : mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, len);
5164
    }
5165
5166
    /**
5167
     * <p>Left pad a String with spaces (' ').</p>
5168
     *
5169
     * <p>The String is padded to the size of {@code size}.</p>
5170
     *
5171
     * <pre>
5172
     * StringUtils.leftPad(null, *)   = null
5173
     * StringUtils.leftPad("", 3)     = "   "
5174
     * StringUtils.leftPad("bat", 3)  = "bat"
5175
     * StringUtils.leftPad("bat", 5)  = "  bat"
5176
     * StringUtils.leftPad("bat", 1)  = "bat"
5177
     * StringUtils.leftPad("bat", -1) = "bat"
5178
     * </pre>
5179
     *
5180
     * @param str  the String to pad out, may be null
5181
     * @param size  the size to pad to
5182
     * @return left padded String or original String if no padding is necessary,
5183
     *  {@code null} if null String input
5184
     */
5185
    public static String leftPad(final String str, final int size) {
5186 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return leftPad(str, size, ' ');
5187
    }
5188
5189
    /**
5190
     * <p>Left pad a String with a specified character.</p>
5191
     *
5192
     * <p>Pad to a size of {@code size}.</p>
5193
     *
5194
     * <pre>
5195
     * StringUtils.leftPad(null, *, *)     = null
5196
     * StringUtils.leftPad("", 3, 'z')     = "zzz"
5197
     * StringUtils.leftPad("bat", 3, 'z')  = "bat"
5198
     * StringUtils.leftPad("bat", 5, 'z')  = "zzbat"
5199
     * StringUtils.leftPad("bat", 1, 'z')  = "bat"
5200
     * StringUtils.leftPad("bat", -1, 'z') = "bat"
5201
     * </pre>
5202
     *
5203
     * @param str  the String to pad out, may be null
5204
     * @param size  the size to pad to
5205
     * @param padChar  the character to pad with
5206
     * @return left padded String or original String if no padding is necessary,
5207
     *  {@code null} if null String input
5208
     * @since 2.0
5209
     */
5210
    public static String leftPad(final String str, final int size, final char padChar) {
5211 1 1. leftPad : negated conditional → KILLED
        if (str == null) {
5212 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5213
        }
5214 1 1. leftPad : Replaced integer subtraction with addition → KILLED
        final int pads = size - str.length();
5215 2 1. leftPad : changed conditional boundary → SURVIVED
2. leftPad : negated conditional → KILLED
        if (pads <= 0) {
5216 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str; // returns original String when possible
5217
        }
5218 2 1. leftPad : changed conditional boundary → SURVIVED
2. leftPad : negated conditional → KILLED
        if (pads > PAD_LIMIT) {
5219 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return leftPad(str, size, String.valueOf(padChar));
5220
        }
5221 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return repeat(padChar, pads).concat(str);
5222
    }
5223
5224
    /**
5225
     * <p>Left pad a String with a specified String.</p>
5226
     *
5227
     * <p>Pad to a size of {@code size}.</p>
5228
     *
5229
     * <pre>
5230
     * StringUtils.leftPad(null, *, *)      = null
5231
     * StringUtils.leftPad("", 3, "z")      = "zzz"
5232
     * StringUtils.leftPad("bat", 3, "yz")  = "bat"
5233
     * StringUtils.leftPad("bat", 5, "yz")  = "yzbat"
5234
     * StringUtils.leftPad("bat", 8, "yz")  = "yzyzybat"
5235
     * StringUtils.leftPad("bat", 1, "yz")  = "bat"
5236
     * StringUtils.leftPad("bat", -1, "yz") = "bat"
5237
     * StringUtils.leftPad("bat", 5, null)  = "  bat"
5238
     * StringUtils.leftPad("bat", 5, "")    = "  bat"
5239
     * </pre>
5240
     *
5241
     * @param str  the String to pad out, may be null
5242
     * @param size  the size to pad to
5243
     * @param padStr  the String to pad with, null or empty treated as single space
5244
     * @return left padded String or original String if no padding is necessary,
5245
     *  {@code null} if null String input
5246
     */
5247
    public static String leftPad(final String str, final int size, String padStr) {
5248 1 1. leftPad : negated conditional → KILLED
        if (str == null) {
5249 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5250
        }
5251 1 1. leftPad : negated conditional → KILLED
        if (isEmpty(padStr)) {
5252
            padStr = SPACE;
5253
        }
5254
        final int padLen = padStr.length();
5255
        final int strLen = str.length();
5256 1 1. leftPad : Replaced integer subtraction with addition → KILLED
        final int pads = size - strLen;
5257 2 1. leftPad : changed conditional boundary → SURVIVED
2. leftPad : negated conditional → KILLED
        if (pads <= 0) {
5258 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str; // returns original String when possible
5259
        }
5260 3 1. leftPad : changed conditional boundary → SURVIVED
2. leftPad : negated conditional → KILLED
3. leftPad : negated conditional → KILLED
        if (padLen == 1 && pads <= PAD_LIMIT) {
5261 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return leftPad(str, size, padStr.charAt(0));
5262
        }
5263
5264 1 1. leftPad : negated conditional → KILLED
        if (pads == padLen) {
5265 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return padStr.concat(str);
5266 2 1. leftPad : changed conditional boundary → SURVIVED
2. leftPad : negated conditional → KILLED
        } else if (pads < padLen) {
5267 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return padStr.substring(0, pads).concat(str);
5268
        } else {
5269
            final char[] padding = new char[pads];
5270
            final char[] padChars = padStr.toCharArray();
5271 3 1. leftPad : changed conditional boundary → KILLED
2. leftPad : Changed increment from 1 to -1 → KILLED
3. leftPad : negated conditional → KILLED
            for (int i = 0; i < pads; i++) {
5272 1 1. leftPad : Replaced integer modulus with multiplication → KILLED
                padding[i] = padChars[i % padLen];
5273
            }
5274 1 1. leftPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return new String(padding).concat(str);
5275
        }
5276
    }
5277
5278
    /**
5279
     * Gets a CharSequence length or {@code 0} if the CharSequence is
5280
     * {@code null}.
5281
     *
5282
     * @param cs
5283
     *            a CharSequence or {@code null}
5284
     * @return CharSequence length or {@code 0} if the CharSequence is
5285
     *         {@code null}.
5286
     * @since 2.4
5287
     * @since 3.0 Changed signature from length(String) to length(CharSequence)
5288
     */
5289
    public static int length(final CharSequence cs) {
5290 2 1. length : negated conditional → KILLED
2. length : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return cs == null ? 0 : cs.length();
5291
    }
5292
5293
    /**
5294
     * <p>Converts a String to lower case as per {@link String#toLowerCase()}.</p>
5295
     *
5296
     * <p>A {@code null} input String returns {@code null}.</p>
5297
     *
5298
     * <pre>
5299
     * StringUtils.lowerCase(null)  = null
5300
     * StringUtils.lowerCase("")    = ""
5301
     * StringUtils.lowerCase("aBc") = "abc"
5302
     * </pre>
5303
     *
5304
     * <p><strong>Note:</strong> As described in the documentation for {@link String#toLowerCase()},
5305
     * the result of this method is affected by the current locale.
5306
     * For platform-independent case transformations, the method {@link #lowerCase(String, Locale)}
5307
     * should be used with a specific locale (e.g. {@link Locale#ENGLISH}).</p>
5308
     *
5309
     * @param str  the String to lower case, may be null
5310
     * @return the lower cased String, {@code null} if null String input
5311
     */
5312
    public static String lowerCase(final String str) {
5313 1 1. lowerCase : negated conditional → KILLED
        if (str == null) {
5314 1 1. lowerCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5315
        }
5316 1 1. lowerCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.toLowerCase();
5317
    }
5318
5319
    /**
5320
     * <p>Converts a String to lower case as per {@link String#toLowerCase(Locale)}.</p>
5321
     *
5322
     * <p>A {@code null} input String returns {@code null}.</p>
5323
     *
5324
     * <pre>
5325
     * StringUtils.lowerCase(null, Locale.ENGLISH)  = null
5326
     * StringUtils.lowerCase("", Locale.ENGLISH)    = ""
5327
     * StringUtils.lowerCase("aBc", Locale.ENGLISH) = "abc"
5328
     * </pre>
5329
     *
5330
     * @param str  the String to lower case, may be null
5331
     * @param locale  the locale that defines the case transformation rules, must not be null
5332
     * @return the lower cased String, {@code null} if null String input
5333
     * @since 2.5
5334
     */
5335
    public static String lowerCase(final String str, final Locale locale) {
5336 1 1. lowerCase : negated conditional → KILLED
        if (str == null) {
5337 1 1. lowerCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5338
        }
5339 1 1. lowerCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.toLowerCase(locale);
5340
    }
5341
5342
    private static int[] matches(final CharSequence first, final CharSequence second) {
5343
        CharSequence max, min;
5344 2 1. matches : changed conditional boundary → SURVIVED
2. matches : negated conditional → KILLED
        if (first.length() > second.length()) {
5345
            max = first;
5346
            min = second;
5347
        } else {
5348
            max = second;
5349
            min = first;
5350
        }
5351 2 1. matches : Replaced integer division with multiplication → KILLED
2. matches : Replaced integer subtraction with addition → KILLED
        final int range = Math.max(max.length() / 2 - 1, 0);
5352
        final int[] matchIndexes = new int[min.length()];
5353 1 1. matches : removed call to java/util/Arrays::fill → KILLED
        Arrays.fill(matchIndexes, -1);
5354
        final boolean[] matchFlags = new boolean[max.length()];
5355
        int matches = 0;
5356 3 1. matches : changed conditional boundary → KILLED
2. matches : Changed increment from 1 to -1 → KILLED
3. matches : negated conditional → KILLED
        for (int mi = 0; mi < min.length(); mi++) {
5357
            final char c1 = min.charAt(mi);
5358 6 1. matches : changed conditional boundary → KILLED
2. matches : Changed increment from 1 to -1 → KILLED
3. matches : Replaced integer subtraction with addition → KILLED
4. matches : Replaced integer addition with subtraction → KILLED
5. matches : Replaced integer addition with subtraction → KILLED
6. matches : negated conditional → KILLED
            for (int xi = Math.max(mi - range, 0), xn = Math.min(mi + range + 1, max.length()); xi < xn; xi++) {
5359 2 1. matches : negated conditional → KILLED
2. matches : negated conditional → KILLED
                if (!matchFlags[xi] && c1 == max.charAt(xi)) {
5360
                    matchIndexes[mi] = xi;
5361
                    matchFlags[xi] = true;
5362 1 1. matches : Changed increment from 1 to -1 → KILLED
                    matches++;
5363
                    break;
5364
                }
5365
            }
5366
        }
5367
        final char[] ms1 = new char[matches];
5368
        final char[] ms2 = new char[matches];
5369 3 1. matches : changed conditional boundary → KILLED
2. matches : Changed increment from 1 to -1 → KILLED
3. matches : negated conditional → KILLED
        for (int i = 0, si = 0; i < min.length(); i++) {
5370 1 1. matches : negated conditional → KILLED
            if (matchIndexes[i] != -1) {
5371
                ms1[si] = min.charAt(i);
5372 1 1. matches : Changed increment from 1 to -1 → KILLED
                si++;
5373
            }
5374
        }
5375 3 1. matches : changed conditional boundary → KILLED
2. matches : Changed increment from 1 to -1 → KILLED
3. matches : negated conditional → KILLED
        for (int i = 0, si = 0; i < max.length(); i++) {
5376 1 1. matches : negated conditional → KILLED
            if (matchFlags[i]) {
5377
                ms2[si] = max.charAt(i);
5378 1 1. matches : Changed increment from 1 to -1 → KILLED
                si++;
5379
            }
5380
        }
5381
        int transpositions = 0;
5382 2 1. matches : changed conditional boundary → KILLED
2. matches : negated conditional → KILLED
        for (int mi = 0; mi < ms1.length; mi++) {
5383 1 1. matches : negated conditional → KILLED
            if (ms1[mi] != ms2[mi]) {
5384 1 1. matches : Changed increment from 1 to -1 → KILLED
                transpositions++;
5385
            }
5386
        }
5387
        int prefix = 0;
5388 2 1. matches : changed conditional boundary → KILLED
2. matches : negated conditional → KILLED
        for (int mi = 0; mi < min.length(); mi++) {
5389 1 1. matches : negated conditional → KILLED
            if (first.charAt(mi) == second.charAt(mi)) {
5390 1 1. matches : Changed increment from 1 to -1 → KILLED
                prefix++;
5391
            } else {
5392
                break;
5393
            }
5394
        }
5395 2 1. matches : Replaced integer division with multiplication → KILLED
2. matches : mutated return of Object value for org/apache/commons/lang3/StringUtils::matches to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new int[] { matches, transpositions / 2, prefix, max.length() };
5396
    }
5397
5398
    /**
5399
     * <p>Gets {@code len} characters from the middle of a String.</p>
5400
     *
5401
     * <p>If {@code len} characters are not available, the remainder
5402
     * of the String will be returned without an exception. If the
5403
     * String is {@code null}, {@code null} will be returned.
5404
     * An empty String is returned if len is negative or exceeds the
5405
     * length of {@code str}.</p>
5406
     *
5407
     * <pre>
5408
     * StringUtils.mid(null, *, *)    = null
5409
     * StringUtils.mid(*, *, -ve)     = ""
5410
     * StringUtils.mid("", 0, *)      = ""
5411
     * StringUtils.mid("abc", 0, 2)   = "ab"
5412
     * StringUtils.mid("abc", 0, 4)   = "abc"
5413
     * StringUtils.mid("abc", 2, 4)   = "c"
5414
     * StringUtils.mid("abc", 4, 2)   = ""
5415
     * StringUtils.mid("abc", -2, 2)  = "ab"
5416
     * </pre>
5417
     *
5418
     * @param str  the String to get the characters from, may be null
5419
     * @param pos  the position to start from, negative treated as zero
5420
     * @param len  the length of the required String
5421
     * @return the middle characters, {@code null} if null String input
5422
     */
5423
    public static String mid(final String str, int pos, final int len) {
5424 1 1. mid : negated conditional → KILLED
        if (str == null) {
5425 1 1. mid : mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5426
        }
5427 4 1. mid : changed conditional boundary → SURVIVED
2. mid : changed conditional boundary → SURVIVED
3. mid : negated conditional → KILLED
4. mid : negated conditional → KILLED
        if (len < 0 || pos > str.length()) {
5428 1 1. mid : mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
5429
        }
5430 2 1. mid : changed conditional boundary → SURVIVED
2. mid : negated conditional → KILLED
        if (pos < 0) {
5431
            pos = 0;
5432
        }
5433 3 1. mid : changed conditional boundary → SURVIVED
2. mid : Replaced integer addition with subtraction → KILLED
3. mid : negated conditional → KILLED
        if (str.length() <= pos + len) {
5434 1 1. mid : mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(pos);
5435
        }
5436 2 1. mid : Replaced integer addition with subtraction → KILLED
2. mid : mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(pos, pos + len);
5437
    }
5438
5439
    private static StringBuilder newStringBuilder(final int noOfItems) {
5440 2 1. newStringBuilder : Replaced integer multiplication with division → SURVIVED
2. newStringBuilder : mutated return of Object value for org/apache/commons/lang3/StringUtils::newStringBuilder to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new StringBuilder(noOfItems * 16);
5441
    }
5442
5443
    /**
5444
     * <p>
5445
     * Similar to <a
5446
     * href="http://www.w3.org/TR/xpath/#function-normalize-space">http://www.w3.org/TR/xpath/#function-normalize
5447
     * -space</a>
5448
     * </p>
5449
     * <p>
5450
     * The function returns the argument string with whitespace normalized by using
5451
     * <code>{@link #trim(String)}</code> to remove leading and trailing whitespace
5452
     * and then replacing sequences of whitespace characters by a single space.
5453
     * </p>
5454
     * In XML Whitespace characters are the same as those allowed by the <a
5455
     * href="http://www.w3.org/TR/REC-xml/#NT-S">S</a> production, which is S ::= (#x20 | #x9 | #xD | #xA)+
5456
     * <p>
5457
     * Java's regexp pattern \s defines whitespace as [ \t\n\x0B\f\r]
5458
     *
5459
     * <p>For reference:</p>
5460
     * <ul>
5461
     * <li>\x0B = vertical tab</li>
5462
     * <li>\f = #xC = form feed</li>
5463
     * <li>#x20 = space</li>
5464
     * <li>#x9 = \t</li>
5465
     * <li>#xA = \n</li>
5466
     * <li>#xD = \r</li>
5467
     * </ul>
5468
     *
5469
     * <p>
5470
     * The difference is that Java's whitespace includes vertical tab and form feed, which this functional will also
5471
     * normalize. Additionally <code>{@link #trim(String)}</code> removes control characters (char &lt;= 32) from both
5472
     * ends of this String.
5473
     * </p>
5474
     *
5475
     * @see Pattern
5476
     * @see #trim(String)
5477
     * @see <a
5478
     *      href="http://www.w3.org/TR/xpath/#function-normalize-space">http://www.w3.org/TR/xpath/#function-normalize-space</a>
5479
     * @param str the source String to normalize whitespaces from, may be null
5480
     * @return the modified string with whitespace normalized, {@code null} if null String input
5481
     *
5482
     * @since 3.0
5483
     */
5484
    public static String normalizeSpace(final String str) {
5485
        // LANG-1020: Improved performance significantly by normalizing manually instead of using regex
5486
        // See https://github.com/librucha/commons-lang-normalizespaces-benchmark for performance test
5487 1 1. normalizeSpace : negated conditional → KILLED
        if (isEmpty(str)) {
5488 1 1. normalizeSpace : mutated return of Object value for org/apache/commons/lang3/StringUtils::normalizeSpace to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5489
        }
5490
        final int size = str.length();
5491
        final char[] newChars = new char[size];
5492
        int count = 0;
5493
        int whitespacesCount = 0;
5494
        boolean startWhitespaces = true;
5495 3 1. normalizeSpace : changed conditional boundary → KILLED
2. normalizeSpace : Changed increment from 1 to -1 → KILLED
3. normalizeSpace : negated conditional → KILLED
        for (int i = 0; i < size; i++) {
5496
            final char actualChar = str.charAt(i);
5497
            final boolean isWhitespace = Character.isWhitespace(actualChar);
5498 1 1. normalizeSpace : negated conditional → KILLED
            if (isWhitespace) {
5499 2 1. normalizeSpace : negated conditional → KILLED
2. normalizeSpace : negated conditional → KILLED
                if (whitespacesCount == 0 && !startWhitespaces) {
5500 1 1. normalizeSpace : Changed increment from 1 to -1 → KILLED
                    newChars[count++] = SPACE.charAt(0);
5501
                }
5502 1 1. normalizeSpace : Changed increment from 1 to -1 → SURVIVED
                whitespacesCount++;
5503
            } else {
5504
                startWhitespaces = false;
5505 2 1. normalizeSpace : Changed increment from 1 to -1 → KILLED
2. normalizeSpace : negated conditional → KILLED
                newChars[count++] = (actualChar == 160 ? 32 : actualChar);
5506
                whitespacesCount = 0;
5507
            }
5508
        }
5509 1 1. normalizeSpace : negated conditional → KILLED
        if (startWhitespaces) {
5510 1 1. normalizeSpace : mutated return of Object value for org/apache/commons/lang3/StringUtils::normalizeSpace to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
5511
        }
5512 4 1. normalizeSpace : Replaced integer subtraction with addition → SURVIVED
2. normalizeSpace : changed conditional boundary → KILLED
3. normalizeSpace : negated conditional → KILLED
4. normalizeSpace : mutated return of Object value for org/apache/commons/lang3/StringUtils::normalizeSpace to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(newChars, 0, count - (whitespacesCount > 0 ? 1 : 0)).trim();
5513
    }
5514
5515
    /**
5516
     * <p>Finds the n-th index within a CharSequence, handling {@code null}.
5517
     * This method uses {@link String#indexOf(String)} if possible.</p>
5518
     * <p><b>Note:</b> The code starts looking for a match at the start of the target,
5519
     * incrementing the starting index by one after each successful match
5520
     * (unless {@code searchStr} is an empty string in which case the position
5521
     * is never incremented and {@code 0} is returned immediately).
5522
     * This means that matches may overlap.</p>
5523
     * <p>A {@code null} CharSequence will return {@code -1}.</p>
5524
     *
5525
     * <pre>
5526
     * StringUtils.ordinalIndexOf(null, *, *)          = -1
5527
     * StringUtils.ordinalIndexOf(*, null, *)          = -1
5528
     * StringUtils.ordinalIndexOf("", "", *)           = 0
5529
     * StringUtils.ordinalIndexOf("aabaabaa", "a", 1)  = 0
5530
     * StringUtils.ordinalIndexOf("aabaabaa", "a", 2)  = 1
5531
     * StringUtils.ordinalIndexOf("aabaabaa", "b", 1)  = 2
5532
     * StringUtils.ordinalIndexOf("aabaabaa", "b", 2)  = 5
5533
     * StringUtils.ordinalIndexOf("aabaabaa", "ab", 1) = 1
5534
     * StringUtils.ordinalIndexOf("aabaabaa", "ab", 2) = 4
5535
     * StringUtils.ordinalIndexOf("aabaabaa", "", 1)   = 0
5536
     * StringUtils.ordinalIndexOf("aabaabaa", "", 2)   = 0
5537
     * </pre>
5538
     *
5539
     * <p>Matches may overlap:</p>
5540
     * <pre>
5541
     * StringUtils.ordinalIndexOf("ababab", "aba", 1)   = 0
5542
     * StringUtils.ordinalIndexOf("ababab", "aba", 2)   = 2
5543
     * StringUtils.ordinalIndexOf("ababab", "aba", 3)   = -1
5544
     *
5545
     * StringUtils.ordinalIndexOf("abababab", "abab", 1) = 0
5546
     * StringUtils.ordinalIndexOf("abababab", "abab", 2) = 2
5547
     * StringUtils.ordinalIndexOf("abababab", "abab", 3) = 4
5548
     * StringUtils.ordinalIndexOf("abababab", "abab", 4) = -1
5549
     * </pre>
5550
     *
5551
     * <p>Note that 'head(CharSequence str, int n)' may be implemented as: </p>
5552
     *
5553
     * <pre>
5554
     *   str.substring(0, lastOrdinalIndexOf(str, "\n", n))
5555
     * </pre>
5556
     *
5557
     * @param str  the CharSequence to check, may be null
5558
     * @param searchStr  the CharSequence to find, may be null
5559
     * @param ordinal  the n-th {@code searchStr} to find
5560
     * @return the n-th index of the search CharSequence,
5561
     *  {@code -1} ({@code INDEX_NOT_FOUND}) if no match or {@code null} string input
5562
     * @since 2.1
5563
     * @since 3.0 Changed signature from ordinalIndexOf(String, String, int) to ordinalIndexOf(CharSequence, CharSequence, int)
5564
     */
5565
    public static int ordinalIndexOf(final CharSequence str, final CharSequence searchStr, final int ordinal) {
5566 1 1. ordinalIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return ordinalIndexOf(str, searchStr, ordinal, false);
5567
    }
5568
5569
    /**
5570
     * <p>Finds the n-th index within a String, handling {@code null}.
5571
     * This method uses {@link String#indexOf(String)} if possible.</p>
5572
     * <p>Note that matches may overlap<p>
5573
     *
5574
     * <p>A {@code null} CharSequence will return {@code -1}.</p>
5575
     *
5576
     * @param str  the CharSequence to check, may be null
5577
     * @param searchStr  the CharSequence to find, may be null
5578
     * @param ordinal  the n-th {@code searchStr} to find, overlapping matches are allowed.
5579
     * @param lastIndex true if lastOrdinalIndexOf() otherwise false if ordinalIndexOf()
5580
     * @return the n-th index of the search CharSequence,
5581
     *  {@code -1} ({@code INDEX_NOT_FOUND}) if no match or {@code null} string input
5582
     */
5583
    // Shared code between ordinalIndexOf(String, String, int) and lastOrdinalIndexOf(String, String, int)
5584
    private static int ordinalIndexOf(final CharSequence str, final CharSequence searchStr, final int ordinal, final boolean lastIndex) {
5585 4 1. ordinalIndexOf : changed conditional boundary → KILLED
2. ordinalIndexOf : negated conditional → KILLED
3. ordinalIndexOf : negated conditional → KILLED
4. ordinalIndexOf : negated conditional → KILLED
        if (str == null || searchStr == null || ordinal <= 0) {
5586 1 1. ordinalIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return INDEX_NOT_FOUND;
5587
        }
5588 1 1. ordinalIndexOf : negated conditional → KILLED
        if (searchStr.length() == 0) {
5589 2 1. ordinalIndexOf : negated conditional → KILLED
2. ordinalIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return lastIndex ? str.length() : 0;
5590
        }
5591
        int found = 0;
5592
        // set the initial index beyond the end of the string
5593
        // this is to allow for the initial index decrement/increment
5594 1 1. ordinalIndexOf : negated conditional → KILLED
        int index = lastIndex ? str.length() : INDEX_NOT_FOUND;
5595
        do {
5596 1 1. ordinalIndexOf : negated conditional → KILLED
            if (lastIndex) {
5597 1 1. ordinalIndexOf : Replaced integer subtraction with addition → KILLED
                index = CharSequenceUtils.lastIndexOf(str, searchStr, index - 1); // step backwards thru string
5598
            } else {
5599 1 1. ordinalIndexOf : Replaced integer addition with subtraction → KILLED
                index = CharSequenceUtils.indexOf(str, searchStr, index + 1); // step forwards through string
5600
            }
5601 2 1. ordinalIndexOf : changed conditional boundary → KILLED
2. ordinalIndexOf : negated conditional → KILLED
            if (index < 0) {
5602 1 1. ordinalIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return index;
5603
            }
5604 1 1. ordinalIndexOf : Changed increment from 1 to -1 → KILLED
            found++;
5605 2 1. ordinalIndexOf : changed conditional boundary → KILLED
2. ordinalIndexOf : negated conditional → KILLED
        } while (found < ordinal);
5606 1 1. ordinalIndexOf : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return index;
5607
    }
5608
5609
    // Overlay
5610
    //-----------------------------------------------------------------------
5611
    /**
5612
     * <p>Overlays part of a String with another String.</p>
5613
     *
5614
     * <p>A {@code null} string input returns {@code null}.
5615
     * A negative index is treated as zero.
5616
     * An index greater than the string length is treated as the string length.
5617
     * The start index is always the smaller of the two indices.</p>
5618
     *
5619
     * <pre>
5620
     * StringUtils.overlay(null, *, *, *)            = null
5621
     * StringUtils.overlay("", "abc", 0, 0)          = "abc"
5622
     * StringUtils.overlay("abcdef", null, 2, 4)     = "abef"
5623
     * StringUtils.overlay("abcdef", "", 2, 4)       = "abef"
5624
     * StringUtils.overlay("abcdef", "", 4, 2)       = "abef"
5625
     * StringUtils.overlay("abcdef", "zzzz", 2, 4)   = "abzzzzef"
5626
     * StringUtils.overlay("abcdef", "zzzz", 4, 2)   = "abzzzzef"
5627
     * StringUtils.overlay("abcdef", "zzzz", -1, 4)  = "zzzzef"
5628
     * StringUtils.overlay("abcdef", "zzzz", 2, 8)   = "abzzzz"
5629
     * StringUtils.overlay("abcdef", "zzzz", -2, -3) = "zzzzabcdef"
5630
     * StringUtils.overlay("abcdef", "zzzz", 8, 10)  = "abcdefzzzz"
5631
     * </pre>
5632
     *
5633
     * @param str  the String to do overlaying in, may be null
5634
     * @param overlay  the String to overlay, may be null
5635
     * @param start  the position to start overlaying at
5636
     * @param end  the position to stop overlaying before
5637
     * @return overlayed String, {@code null} if null String input
5638
     * @since 2.0
5639
     */
5640
    public static String overlay(final String str, String overlay, int start, int end) {
5641 1 1. overlay : negated conditional → KILLED
        if (str == null) {
5642 1 1. overlay : mutated return of Object value for org/apache/commons/lang3/StringUtils::overlay to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
5643
        }
5644 1 1. overlay : negated conditional → KILLED
        if (overlay == null) {
5645
            overlay = EMPTY;
5646
        }
5647
        final int len = str.length();
5648 2 1. overlay : changed conditional boundary → SURVIVED
2. overlay : negated conditional → KILLED
        if (start < 0) {
5649
            start = 0;
5650
        }
5651 2 1. overlay : changed conditional boundary → SURVIVED
2. overlay : negated conditional → KILLED
        if (start > len) {
5652
            start = len;
5653
        }
5654 2 1. overlay : changed conditional boundary → SURVIVED
2. overlay : negated conditional → KILLED
        if (end < 0) {
5655
            end = 0;
5656
        }
5657 2 1. overlay : changed conditional boundary → SURVIVED
2. overlay : negated conditional → KILLED
        if (end > len) {
5658
            end = len;
5659
        }
5660 2 1. overlay : changed conditional boundary → SURVIVED
2. overlay : negated conditional → KILLED
        if (start > end) {
5661
            final int temp = start;
5662
            start = end;
5663
            end = temp;
5664
        }
5665 1 1. overlay : mutated return of Object value for org/apache/commons/lang3/StringUtils::overlay to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, start) +
5666
            overlay +
5667
            str.substring(end);
5668
    }
5669
5670
    /**
5671
     * Prepends the prefix to the start of the string if the string does not
5672
     * already start with any of the prefixes.
5673
     *
5674
     * @param str The string.
5675
     * @param prefix The prefix to prepend to the start of the string.
5676
     * @param ignoreCase Indicates whether the compare should ignore case.
5677
     * @param prefixes Additional prefixes that are valid (optional).
5678
     *
5679
     * @return A new String if prefix was prepended, the same string otherwise.
5680
     */
5681
    private static String prependIfMissing(final String str, final CharSequence prefix, final boolean ignoreCase, final CharSequence... prefixes) {
5682 3 1. prependIfMissing : negated conditional → KILLED
2. prependIfMissing : negated conditional → KILLED
3. prependIfMissing : negated conditional → KILLED
        if (str == null || isEmpty(prefix) || startsWith(str, prefix, ignoreCase)) {
5683 1 1. prependIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5684
        }
5685 3 1. prependIfMissing : changed conditional boundary → SURVIVED
2. prependIfMissing : negated conditional → KILLED
3. prependIfMissing : negated conditional → KILLED
        if (prefixes != null && prefixes.length > 0) {
5686
            for (final CharSequence p : prefixes) {
5687 1 1. prependIfMissing : negated conditional → KILLED
                if (startsWith(str, p, ignoreCase)) {
5688 1 1. prependIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
                    return str;
5689
                }
5690
            }
5691
        }
5692 1 1. prependIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return prefix.toString() + str;
5693
    }
5694
5695
    /**
5696
     * Prepends the prefix to the start of the string if the string does not
5697
     * already start with any of the prefixes.
5698
     *
5699
     * <pre>
5700
     * StringUtils.prependIfMissing(null, null) = null
5701
     * StringUtils.prependIfMissing("abc", null) = "abc"
5702
     * StringUtils.prependIfMissing("", "xyz") = "xyz"
5703
     * StringUtils.prependIfMissing("abc", "xyz") = "xyzabc"
5704
     * StringUtils.prependIfMissing("xyzabc", "xyz") = "xyzabc"
5705
     * StringUtils.prependIfMissing("XYZabc", "xyz") = "xyzXYZabc"
5706
     * </pre>
5707
     * <p>With additional prefixes,</p>
5708
     * <pre>
5709
     * StringUtils.prependIfMissing(null, null, null) = null
5710
     * StringUtils.prependIfMissing("abc", null, null) = "abc"
5711
     * StringUtils.prependIfMissing("", "xyz", null) = "xyz"
5712
     * StringUtils.prependIfMissing("abc", "xyz", new CharSequence[]{null}) = "xyzabc"
5713
     * StringUtils.prependIfMissing("abc", "xyz", "") = "abc"
5714
     * StringUtils.prependIfMissing("abc", "xyz", "mno") = "xyzabc"
5715
     * StringUtils.prependIfMissing("xyzabc", "xyz", "mno") = "xyzabc"
5716
     * StringUtils.prependIfMissing("mnoabc", "xyz", "mno") = "mnoabc"
5717
     * StringUtils.prependIfMissing("XYZabc", "xyz", "mno") = "xyzXYZabc"
5718
     * StringUtils.prependIfMissing("MNOabc", "xyz", "mno") = "xyzMNOabc"
5719
     * </pre>
5720
     *
5721
     * @param str The string.
5722
     * @param prefix The prefix to prepend to the start of the string.
5723
     * @param prefixes Additional prefixes that are valid.
5724
     *
5725
     * @return A new String if prefix was prepended, the same string otherwise.
5726
     *
5727
     * @since 3.2
5728
     */
5729
    public static String prependIfMissing(final String str, final CharSequence prefix, final CharSequence... prefixes) {
5730 1 1. prependIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return prependIfMissing(str, prefix, false, prefixes);
5731
    }
5732
5733
    /**
5734
     * Prepends the prefix to the start of the string if the string does not
5735
     * already start, case insensitive, with any of the prefixes.
5736
     *
5737
     * <pre>
5738
     * StringUtils.prependIfMissingIgnoreCase(null, null) = null
5739
     * StringUtils.prependIfMissingIgnoreCase("abc", null) = "abc"
5740
     * StringUtils.prependIfMissingIgnoreCase("", "xyz") = "xyz"
5741
     * StringUtils.prependIfMissingIgnoreCase("abc", "xyz") = "xyzabc"
5742
     * StringUtils.prependIfMissingIgnoreCase("xyzabc", "xyz") = "xyzabc"
5743
     * StringUtils.prependIfMissingIgnoreCase("XYZabc", "xyz") = "XYZabc"
5744
     * </pre>
5745
     * <p>With additional prefixes,</p>
5746
     * <pre>
5747
     * StringUtils.prependIfMissingIgnoreCase(null, null, null) = null
5748
     * StringUtils.prependIfMissingIgnoreCase("abc", null, null) = "abc"
5749
     * StringUtils.prependIfMissingIgnoreCase("", "xyz", null) = "xyz"
5750
     * StringUtils.prependIfMissingIgnoreCase("abc", "xyz", new CharSequence[]{null}) = "xyzabc"
5751
     * StringUtils.prependIfMissingIgnoreCase("abc", "xyz", "") = "abc"
5752
     * StringUtils.prependIfMissingIgnoreCase("abc", "xyz", "mno") = "xyzabc"
5753
     * StringUtils.prependIfMissingIgnoreCase("xyzabc", "xyz", "mno") = "xyzabc"
5754
     * StringUtils.prependIfMissingIgnoreCase("mnoabc", "xyz", "mno") = "mnoabc"
5755
     * StringUtils.prependIfMissingIgnoreCase("XYZabc", "xyz", "mno") = "XYZabc"
5756
     * StringUtils.prependIfMissingIgnoreCase("MNOabc", "xyz", "mno") = "MNOabc"
5757
     * </pre>
5758
     *
5759
     * @param str The string.
5760
     * @param prefix The prefix to prepend to the start of the string.
5761
     * @param prefixes Additional prefixes that are valid (optional).
5762
     *
5763
     * @return A new String if prefix was prepended, the same string otherwise.
5764
     *
5765
     * @since 3.2
5766
     */
5767
    public static String prependIfMissingIgnoreCase(final String str, final CharSequence prefix, final CharSequence... prefixes) {
5768 1 1. prependIfMissingIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissingIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return prependIfMissing(str, prefix, true, prefixes);
5769
    }
5770
5771
    /**
5772
     * <p>Removes all occurrences of a character from within the source string.</p>
5773
     *
5774
     * <p>A {@code null} source string will return {@code null}.
5775
     * An empty ("") source string will return the empty string.</p>
5776
     *
5777
     * <pre>
5778
     * StringUtils.remove(null, *)       = null
5779
     * StringUtils.remove("", *)         = ""
5780
     * StringUtils.remove("queued", 'u') = "qeed"
5781
     * StringUtils.remove("queued", 'z') = "queued"
5782
     * </pre>
5783
     *
5784
     * @param str  the source String to search, may be null
5785
     * @param remove  the char to search for and remove, may be null
5786
     * @return the substring with the char removed if found,
5787
     *  {@code null} if null String input
5788
     * @since 2.1
5789
     */
5790
    public static String remove(final String str, final char remove) {
5791 2 1. remove : negated conditional → KILLED
2. remove : negated conditional → KILLED
        if (isEmpty(str) || str.indexOf(remove) == INDEX_NOT_FOUND) {
5792 1 1. remove : mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5793
        }
5794
        final char[] chars = str.toCharArray();
5795
        int pos = 0;
5796 2 1. remove : changed conditional boundary → KILLED
2. remove : negated conditional → KILLED
        for (int i = 0; i < chars.length; i++) {
5797 1 1. remove : negated conditional → KILLED
            if (chars[i] != remove) {
5798 1 1. remove : Changed increment from 1 to -1 → KILLED
                chars[pos++] = chars[i];
5799
            }
5800
        }
5801 1 1. remove : mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(chars, 0, pos);
5802
    }
5803
5804
    /**
5805
     * <p>Removes all occurrences of a substring from within the source string.</p>
5806
     *
5807
     * <p>A {@code null} source string will return {@code null}.
5808
     * An empty ("") source string will return the empty string.
5809
     * A {@code null} remove string will return the source string.
5810
     * An empty ("") remove string will return the source string.</p>
5811
     *
5812
     * <pre>
5813
     * StringUtils.remove(null, *)        = null
5814
     * StringUtils.remove("", *)          = ""
5815
     * StringUtils.remove(*, null)        = *
5816
     * StringUtils.remove(*, "")          = *
5817
     * StringUtils.remove("queued", "ue") = "qd"
5818
     * StringUtils.remove("queued", "zz") = "queued"
5819
     * </pre>
5820
     *
5821
     * @param str  the source String to search, may be null
5822
     * @param remove  the String to search for and remove, may be null
5823
     * @return the substring with the string removed if found,
5824
     *  {@code null} if null String input
5825
     * @since 2.1
5826
     */
5827
    public static String remove(final String str, final String remove) {
5828 2 1. remove : negated conditional → KILLED
2. remove : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(remove)) {
5829 1 1. remove : mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5830
        }
5831 1 1. remove : mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replace(str, remove, EMPTY, -1);
5832
    }
5833
5834
    /**
5835
     * <p>Removes each substring of the text String that matches the given regular expression.</p>
5836
     *
5837
     * This method is a {@code null} safe equivalent to:
5838
     * <ul>
5839
     *  <li>{@code text.replaceAll(regex, StringUtils.EMPTY)}</li>
5840
     *  <li>{@code Pattern.compile(regex).matcher(text).replaceAll(StringUtils.EMPTY)}</li>
5841
     * </ul>
5842
     *
5843
     * <p>A {@code null} reference passed to this method is a no-op.</p>
5844
     *
5845
     * <p>Unlike in the {@link #removePattern(String, String)} method, the {@link Pattern#DOTALL} option
5846
     * is NOT automatically added.
5847
     * To use the DOTALL option prepend <code>"(?s)"</code> to the regex.
5848
     * DOTALL is also known as single-line mode in Perl.</p>
5849
     *
5850
     * <pre>
5851
     * StringUtils.removeAll(null, *)      = null
5852
     * StringUtils.removeAll("any", (String) null)  = "any"
5853
     * StringUtils.removeAll("any", "")    = "any"
5854
     * StringUtils.removeAll("any", ".*")  = ""
5855
     * StringUtils.removeAll("any", ".+")  = ""
5856
     * StringUtils.removeAll("abc", ".?")  = ""
5857
     * StringUtils.removeAll("A&lt;__&gt;\n&lt;__&gt;B", "&lt;.*&gt;")      = "A\nB"
5858
     * StringUtils.removeAll("A&lt;__&gt;\n&lt;__&gt;B", "(?s)&lt;.*&gt;")  = "AB"
5859
     * StringUtils.removeAll("ABCabc123abc", "[a-z]")     = "ABC123"
5860
     * </pre>
5861
     *
5862
     * @param text  text to remove from, may be null
5863
     * @param regex  the regular expression to which this string is to be matched
5864
     * @return  the text with any removes processed,
5865
     *              {@code null} if null String input
5866
     *
5867
     * @throws  java.util.regex.PatternSyntaxException
5868
     *              if the regular expression's syntax is invalid
5869
     *
5870
     * @see #replaceAll(String, String, String)
5871
     * @see #removePattern(String, String)
5872
     * @see String#replaceAll(String, String)
5873
     * @see java.util.regex.Pattern
5874
     * @see java.util.regex.Pattern#DOTALL
5875
     * @since 3.5
5876
     *
5877
     * @deprecated Moved to RegExUtils.
5878
     */
5879
    @Deprecated
5880
    public static String removeAll(final String text, final String regex) {
5881 1 1. removeAll : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeAll to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return RegExUtils.removeAll(text, regex);
5882
    }
5883
5884
    /**
5885
     * <p>Removes a substring only if it is at the end of a source string,
5886
     * otherwise returns the source string.</p>
5887
     *
5888
     * <p>A {@code null} source string will return {@code null}.
5889
     * An empty ("") source string will return the empty string.
5890
     * A {@code null} search string will return the source string.</p>
5891
     *
5892
     * <pre>
5893
     * StringUtils.removeEnd(null, *)      = null
5894
     * StringUtils.removeEnd("", *)        = ""
5895
     * StringUtils.removeEnd(*, null)      = *
5896
     * StringUtils.removeEnd("www.domain.com", ".com.")  = "www.domain.com"
5897
     * StringUtils.removeEnd("www.domain.com", ".com")   = "www.domain"
5898
     * StringUtils.removeEnd("www.domain.com", "domain") = "www.domain.com"
5899
     * StringUtils.removeEnd("abc", "")    = "abc"
5900
     * </pre>
5901
     *
5902
     * @param str  the source String to search, may be null
5903
     * @param remove  the String to search for and remove, may be null
5904
     * @return the substring with the string removed if found,
5905
     *  {@code null} if null String input
5906
     * @since 2.1
5907
     */
5908
    public static String removeEnd(final String str, final String remove) {
5909 2 1. removeEnd : negated conditional → KILLED
2. removeEnd : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(remove)) {
5910 1 1. removeEnd : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5911
        }
5912 1 1. removeEnd : negated conditional → KILLED
        if (str.endsWith(remove)) {
5913 2 1. removeEnd : Replaced integer subtraction with addition → KILLED
2. removeEnd : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(0, str.length() - remove.length());
5914
        }
5915 1 1. removeEnd : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
5916
    }
5917
5918
    /**
5919
     * <p>Case insensitive removal of a substring if it is at the end of a source string,
5920
     * otherwise returns the source string.</p>
5921
     *
5922
     * <p>A {@code null} source string will return {@code null}.
5923
     * An empty ("") source string will return the empty string.
5924
     * A {@code null} search string will return the source string.</p>
5925
     *
5926
     * <pre>
5927
     * StringUtils.removeEndIgnoreCase(null, *)      = null
5928
     * StringUtils.removeEndIgnoreCase("", *)        = ""
5929
     * StringUtils.removeEndIgnoreCase(*, null)      = *
5930
     * StringUtils.removeEndIgnoreCase("www.domain.com", ".com.")  = "www.domain.com"
5931
     * StringUtils.removeEndIgnoreCase("www.domain.com", ".com")   = "www.domain"
5932
     * StringUtils.removeEndIgnoreCase("www.domain.com", "domain") = "www.domain.com"
5933
     * StringUtils.removeEndIgnoreCase("abc", "")    = "abc"
5934
     * StringUtils.removeEndIgnoreCase("www.domain.com", ".COM") = "www.domain")
5935
     * StringUtils.removeEndIgnoreCase("www.domain.COM", ".com") = "www.domain")
5936
     * </pre>
5937
     *
5938
     * @param str  the source String to search, may be null
5939
     * @param remove  the String to search for (case insensitive) and remove, may be null
5940
     * @return the substring with the string removed if found,
5941
     *  {@code null} if null String input
5942
     * @since 2.4
5943
     */
5944
    public static String removeEndIgnoreCase(final String str, final String remove) {
5945 2 1. removeEndIgnoreCase : negated conditional → KILLED
2. removeEndIgnoreCase : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(remove)) {
5946 1 1. removeEndIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEndIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
5947
        }
5948 1 1. removeEndIgnoreCase : negated conditional → KILLED
        if (endsWithIgnoreCase(str, remove)) {
5949 2 1. removeEndIgnoreCase : Replaced integer subtraction with addition → KILLED
2. removeEndIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEndIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(0, str.length() - remove.length());
5950
        }
5951 1 1. removeEndIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEndIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
5952
    }
5953
5954
    /**
5955
     * <p>Removes the first substring of the text string that matches the given regular expression.</p>
5956
     *
5957
     * This method is a {@code null} safe equivalent to:
5958
     * <ul>
5959
     *  <li>{@code text.replaceFirst(regex, StringUtils.EMPTY)}</li>
5960
     *  <li>{@code Pattern.compile(regex).matcher(text).replaceFirst(StringUtils.EMPTY)}</li>
5961
     * </ul>
5962
     *
5963
     * <p>A {@code null} reference passed to this method is a no-op.</p>
5964
     *
5965
     * <p>The {@link Pattern#DOTALL} option is NOT automatically added.
5966
     * To use the DOTALL option prepend <code>"(?s)"</code> to the regex.
5967
     * DOTALL is also known as single-line mode in Perl.</p>
5968
     *
5969
     * <pre>
5970
     * StringUtils.removeFirst(null, *)      = null
5971
     * StringUtils.removeFirst("any", (String) null)  = "any"
5972
     * StringUtils.removeFirst("any", "")    = "any"
5973
     * StringUtils.removeFirst("any", ".*")  = ""
5974
     * StringUtils.removeFirst("any", ".+")  = ""
5975
     * StringUtils.removeFirst("abc", ".?")  = "bc"
5976
     * StringUtils.removeFirst("A&lt;__&gt;\n&lt;__&gt;B", "&lt;.*&gt;")      = "A\n&lt;__&gt;B"
5977
     * StringUtils.removeFirst("A&lt;__&gt;\n&lt;__&gt;B", "(?s)&lt;.*&gt;")  = "AB"
5978
     * StringUtils.removeFirst("ABCabc123", "[a-z]")          = "ABCbc123"
5979
     * StringUtils.removeFirst("ABCabc123abc", "[a-z]+")      = "ABC123abc"
5980
     * </pre>
5981
     *
5982
     * @param text  text to remove from, may be null
5983
     * @param regex  the regular expression to which this string is to be matched
5984
     * @return  the text with the first replacement processed,
5985
     *              {@code null} if null String input
5986
     *
5987
     * @throws  java.util.regex.PatternSyntaxException
5988
     *              if the regular expression's syntax is invalid
5989
     *
5990
     * @see #replaceFirst(String, String, String)
5991
     * @see String#replaceFirst(String, String)
5992
     * @see java.util.regex.Pattern
5993
     * @see java.util.regex.Pattern#DOTALL
5994
     * @since 3.5
5995
     *
5996
     * @deprecated Moved to RegExUtils.
5997
     */
5998
    @Deprecated
5999
    public static String removeFirst(final String text, final String regex) {
6000 1 1. removeFirst : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeFirst to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replaceFirst(text, regex, EMPTY);
6001
    }
6002
6003
    /**
6004
     * <p>
6005
     * Case insensitive removal of all occurrences of a substring from within
6006
     * the source string.
6007
     * </p>
6008
     *
6009
     * <p>
6010
     * A {@code null} source string will return {@code null}. An empty ("")
6011
     * source string will return the empty string. A {@code null} remove string
6012
     * will return the source string. An empty ("") remove string will return
6013
     * the source string.
6014
     * </p>
6015
     *
6016
     * <pre>
6017
     * StringUtils.removeIgnoreCase(null, *)        = null
6018
     * StringUtils.removeIgnoreCase("", *)          = ""
6019
     * StringUtils.removeIgnoreCase(*, null)        = *
6020
     * StringUtils.removeIgnoreCase(*, "")          = *
6021
     * StringUtils.removeIgnoreCase("queued", "ue") = "qd"
6022
     * StringUtils.removeIgnoreCase("queued", "zz") = "queued"
6023
     * StringUtils.removeIgnoreCase("quEUed", "UE") = "qd"
6024
     * StringUtils.removeIgnoreCase("queued", "zZ") = "queued"
6025
     * </pre>
6026
     *
6027
     * @param str
6028
     *            the source String to search, may be null
6029
     * @param remove
6030
     *            the String to search for (case insensitive) and remove, may be
6031
     *            null
6032
     * @return the substring with the string removed if found, {@code null} if
6033
     *         null String input
6034
     * @since 3.5
6035
     */
6036
    public static String removeIgnoreCase(final String str, final String remove) {
6037 2 1. removeIgnoreCase : negated conditional → KILLED
2. removeIgnoreCase : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(remove)) {
6038 1 1. removeIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
6039
        }
6040 1 1. removeIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replaceIgnoreCase(str, remove, EMPTY, -1);
6041
    }
6042
6043
    /**
6044
     * <p>Removes each substring of the source String that matches the given regular expression using the DOTALL option.
6045
     * </p>
6046
     *
6047
     * This call is a {@code null} safe equivalent to:
6048
     * <ul>
6049
     * <li>{@code source.replaceAll(&quot;(?s)&quot; + regex, StringUtils.EMPTY)}</li>
6050
     * <li>{@code Pattern.compile(regex, Pattern.DOTALL).matcher(source).replaceAll(StringUtils.EMPTY)}</li>
6051
     * </ul>
6052
     *
6053
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6054
     *
6055
     * <pre>
6056
     * StringUtils.removePattern(null, *)       = null
6057
     * StringUtils.removePattern("any", (String) null)   = "any"
6058
     * StringUtils.removePattern("A&lt;__&gt;\n&lt;__&gt;B", "&lt;.*&gt;")  = "AB"
6059
     * StringUtils.removePattern("ABCabc123", "[a-z]")    = "ABC123"
6060
     * </pre>
6061
     *
6062
     * @param source
6063
     *            the source string
6064
     * @param regex
6065
     *            the regular expression to which this string is to be matched
6066
     * @return The resulting {@code String}
6067
     * @see #replacePattern(String, String, String)
6068
     * @see String#replaceAll(String, String)
6069
     * @see Pattern#DOTALL
6070
     * @since 3.2
6071
     * @since 3.5 Changed {@code null} reference passed to this method is a no-op.
6072
     *
6073
     * @deprecated Moved to RegExUtils.
6074
     */
6075
    @Deprecated
6076
    public static String removePattern(final String source, final String regex) {
6077 1 1. removePattern : mutated return of Object value for org/apache/commons/lang3/StringUtils::removePattern to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return RegExUtils.removePattern(source, regex);
6078
    }
6079
6080
    // Remove
6081
    //-----------------------------------------------------------------------
6082
    /**
6083
     * <p>Removes a substring only if it is at the beginning of a source string,
6084
     * otherwise returns the source string.</p>
6085
     *
6086
     * <p>A {@code null} source string will return {@code null}.
6087
     * An empty ("") source string will return the empty string.
6088
     * A {@code null} search string will return the source string.</p>
6089
     *
6090
     * <pre>
6091
     * StringUtils.removeStart(null, *)      = null
6092
     * StringUtils.removeStart("", *)        = ""
6093
     * StringUtils.removeStart(*, null)      = *
6094
     * StringUtils.removeStart("www.domain.com", "www.")   = "domain.com"
6095
     * StringUtils.removeStart("domain.com", "www.")       = "domain.com"
6096
     * StringUtils.removeStart("www.domain.com", "domain") = "www.domain.com"
6097
     * StringUtils.removeStart("abc", "")    = "abc"
6098
     * </pre>
6099
     *
6100
     * @param str  the source String to search, may be null
6101
     * @param remove  the String to search for and remove, may be null
6102
     * @return the substring with the string removed if found,
6103
     *  {@code null} if null String input
6104
     * @since 2.1
6105
     */
6106
    public static String removeStart(final String str, final String remove) {
6107 2 1. removeStart : negated conditional → KILLED
2. removeStart : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(remove)) {
6108 1 1. removeStart : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStart to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
6109
        }
6110 1 1. removeStart : negated conditional → KILLED
        if (str.startsWith(remove)) {
6111 1 1. removeStart : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStart to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(remove.length());
6112
        }
6113 1 1. removeStart : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStart to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
6114
    }
6115
6116
    /**
6117
     * <p>Case insensitive removal of a substring if it is at the beginning of a source string,
6118
     * otherwise returns the source string.</p>
6119
     *
6120
     * <p>A {@code null} source string will return {@code null}.
6121
     * An empty ("") source string will return the empty string.
6122
     * A {@code null} search string will return the source string.</p>
6123
     *
6124
     * <pre>
6125
     * StringUtils.removeStartIgnoreCase(null, *)      = null
6126
     * StringUtils.removeStartIgnoreCase("", *)        = ""
6127
     * StringUtils.removeStartIgnoreCase(*, null)      = *
6128
     * StringUtils.removeStartIgnoreCase("www.domain.com", "www.")   = "domain.com"
6129
     * StringUtils.removeStartIgnoreCase("www.domain.com", "WWW.")   = "domain.com"
6130
     * StringUtils.removeStartIgnoreCase("domain.com", "www.")       = "domain.com"
6131
     * StringUtils.removeStartIgnoreCase("www.domain.com", "domain") = "www.domain.com"
6132
     * StringUtils.removeStartIgnoreCase("abc", "")    = "abc"
6133
     * </pre>
6134
     *
6135
     * @param str  the source String to search, may be null
6136
     * @param remove  the String to search for (case insensitive) and remove, may be null
6137
     * @return the substring with the string removed if found,
6138
     *  {@code null} if null String input
6139
     * @since 2.4
6140
     */
6141
    public static String removeStartIgnoreCase(final String str, final String remove) {
6142 2 1. removeStartIgnoreCase : negated conditional → KILLED
2. removeStartIgnoreCase : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(remove)) {
6143 1 1. removeStartIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStartIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
6144
        }
6145 1 1. removeStartIgnoreCase : negated conditional → KILLED
        if (startsWithIgnoreCase(str, remove)) {
6146 1 1. removeStartIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStartIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(remove.length());
6147
        }
6148 1 1. removeStartIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStartIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
6149
    }
6150
6151
    /**
6152
     * <p>Returns padding using the specified delimiter repeated
6153
     * to a given length.</p>
6154
     *
6155
     * <pre>
6156
     * StringUtils.repeat('e', 0)  = ""
6157
     * StringUtils.repeat('e', 3)  = "eee"
6158
     * StringUtils.repeat('e', -2) = ""
6159
     * </pre>
6160
     *
6161
     * <p>Note: this method does not support padding with
6162
     * <a href="http://www.unicode.org/glossary/#supplementary_character">Unicode Supplementary Characters</a>
6163
     * as they require a pair of {@code char}s to be represented.
6164
     * If you are needing to support full I18N of your applications
6165
     * consider using {@link #repeat(String, int)} instead.
6166
     * </p>
6167
     *
6168
     * @param ch  character to repeat
6169
     * @param repeat  number of times to repeat char, negative treated as zero
6170
     * @return String with repeated character
6171
     * @see #repeat(String, int)
6172
     */
6173
    public static String repeat(final char ch, final int repeat) {
6174 2 1. repeat : changed conditional boundary → SURVIVED
2. repeat : negated conditional → KILLED
        if (repeat <= 0) {
6175 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
6176
        }
6177
        final char[] buf = new char[repeat];
6178 4 1. repeat : changed conditional boundary → KILLED
2. repeat : Changed increment from -1 to 1 → KILLED
3. repeat : Replaced integer subtraction with addition → KILLED
4. repeat : negated conditional → KILLED
        for (int i = repeat - 1; i >= 0; i--) {
6179
            buf[i] = ch;
6180
        }
6181 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(buf);
6182
    }
6183
6184
    // Padding
6185
    //-----------------------------------------------------------------------
6186
    /**
6187
     * <p>Repeat a String {@code repeat} times to form a
6188
     * new String.</p>
6189
     *
6190
     * <pre>
6191
     * StringUtils.repeat(null, 2) = null
6192
     * StringUtils.repeat("", 0)   = ""
6193
     * StringUtils.repeat("", 2)   = ""
6194
     * StringUtils.repeat("a", 3)  = "aaa"
6195
     * StringUtils.repeat("ab", 2) = "abab"
6196
     * StringUtils.repeat("a", -2) = ""
6197
     * </pre>
6198
     *
6199
     * @param str  the String to repeat, may be null
6200
     * @param repeat  number of times to repeat str, negative treated as zero
6201
     * @return a new String consisting of the original String repeated,
6202
     *  {@code null} if null String input
6203
     */
6204
    public static String repeat(final String str, final int repeat) {
6205
        // Performance tuned for 2.0 (JDK1.4)
6206
6207 1 1. repeat : negated conditional → KILLED
        if (str == null) {
6208 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
6209
        }
6210 2 1. repeat : changed conditional boundary → SURVIVED
2. repeat : negated conditional → KILLED
        if (repeat <= 0) {
6211 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
6212
        }
6213
        final int inputLength = str.length();
6214 2 1. repeat : negated conditional → KILLED
2. repeat : negated conditional → KILLED
        if (repeat == 1 || inputLength == 0) {
6215 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
6216
        }
6217 3 1. repeat : changed conditional boundary → SURVIVED
2. repeat : negated conditional → SURVIVED
3. repeat : negated conditional → KILLED
        if (inputLength == 1 && repeat <= PAD_LIMIT) {
6218 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return repeat(str.charAt(0), repeat);
6219
        }
6220
6221 1 1. repeat : Replaced integer multiplication with division → KILLED
        final int outputLength = inputLength * repeat;
6222
        switch (inputLength) {
6223
            case 1 :
6224 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return repeat(str.charAt(0), repeat);
6225
            case 2 :
6226
                final char ch0 = str.charAt(0);
6227
                final char ch1 = str.charAt(1);
6228
                final char[] output2 = new char[outputLength];
6229 6 1. repeat : Changed increment from -1 to 1 → TIMED_OUT
2. repeat : Changed increment from -1 to 1 → TIMED_OUT
3. repeat : changed conditional boundary → KILLED
4. repeat : Replaced integer multiplication with division → KILLED
5. repeat : Replaced integer subtraction with addition → KILLED
6. repeat : negated conditional → KILLED
                for (int i = repeat * 2 - 2; i >= 0; i--, i--) {
6230
                    output2[i] = ch0;
6231 1 1. repeat : Replaced integer addition with subtraction → KILLED
                    output2[i + 1] = ch1;
6232
                }
6233 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return new String(output2);
6234
            default :
6235
                final StringBuilder buf = new StringBuilder(outputLength);
6236 3 1. repeat : Changed increment from 1 to -1 → MEMORY_ERROR
2. repeat : changed conditional boundary → KILLED
3. repeat : negated conditional → KILLED
                for (int i = 0; i < repeat; i++) {
6237
                    buf.append(str);
6238
                }
6239 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return buf.toString();
6240
        }
6241
    }
6242
6243
    /**
6244
     * <p>Repeat a String {@code repeat} times to form a
6245
     * new String, with a String separator injected each time. </p>
6246
     *
6247
     * <pre>
6248
     * StringUtils.repeat(null, null, 2) = null
6249
     * StringUtils.repeat(null, "x", 2)  = null
6250
     * StringUtils.repeat("", null, 0)   = ""
6251
     * StringUtils.repeat("", "", 2)     = ""
6252
     * StringUtils.repeat("", "x", 3)    = "xxx"
6253
     * StringUtils.repeat("?", ", ", 3)  = "?, ?, ?"
6254
     * </pre>
6255
     *
6256
     * @param str        the String to repeat, may be null
6257
     * @param separator  the String to inject, may be null
6258
     * @param repeat     number of times to repeat str, negative treated as zero
6259
     * @return a new String consisting of the original String repeated,
6260
     *  {@code null} if null String input
6261
     * @since 2.5
6262
     */
6263
    public static String repeat(final String str, final String separator, final int repeat) {
6264 2 1. repeat : negated conditional → KILLED
2. repeat : negated conditional → KILLED
        if (str == null || separator == null) {
6265 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return repeat(str, repeat);
6266
        }
6267
        // given that repeat(String, int) is quite optimized, better to rely on it than try and splice this into it
6268
        final String result = repeat(str + separator, repeat);
6269 1 1. repeat : mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return removeEnd(result, separator);
6270
    }
6271
6272
    // Conversion
6273
    //-----------------------------------------------------------------------
6274
6275
    /**
6276
     * <p>Replaces all occurrences of a String within another String.</p>
6277
     *
6278
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6279
     *
6280
     * <pre>
6281
     * StringUtils.replace(null, *, *)        = null
6282
     * StringUtils.replace("", *, *)          = ""
6283
     * StringUtils.replace("any", null, *)    = "any"
6284
     * StringUtils.replace("any", *, null)    = "any"
6285
     * StringUtils.replace("any", "", *)      = "any"
6286
     * StringUtils.replace("aba", "a", null)  = "aba"
6287
     * StringUtils.replace("aba", "a", "")    = "b"
6288
     * StringUtils.replace("aba", "a", "z")   = "zbz"
6289
     * </pre>
6290
     *
6291
     * @see #replace(String text, String searchString, String replacement, int max)
6292
     * @param text  text to search and replace in, may be null
6293
     * @param searchString  the String to search for, may be null
6294
     * @param replacement  the String to replace it with, may be null
6295
     * @return the text with any replacements processed,
6296
     *  {@code null} if null String input
6297
     */
6298
    public static String replace(final String text, final String searchString, final String replacement) {
6299 1 1. replace : mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replace(text, searchString, replacement, -1);
6300
    }
6301
6302
    /**
6303
     * <p>Replaces a String with another String inside a larger String,
6304
     * for the first {@code max} values of the search String.</p>
6305
     *
6306
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6307
     *
6308
     * <pre>
6309
     * StringUtils.replace(null, *, *, *)         = null
6310
     * StringUtils.replace("", *, *, *)           = ""
6311
     * StringUtils.replace("any", null, *, *)     = "any"
6312
     * StringUtils.replace("any", *, null, *)     = "any"
6313
     * StringUtils.replace("any", "", *, *)       = "any"
6314
     * StringUtils.replace("any", *, *, 0)        = "any"
6315
     * StringUtils.replace("abaa", "a", null, -1) = "abaa"
6316
     * StringUtils.replace("abaa", "a", "", -1)   = "b"
6317
     * StringUtils.replace("abaa", "a", "z", 0)   = "abaa"
6318
     * StringUtils.replace("abaa", "a", "z", 1)   = "zbaa"
6319
     * StringUtils.replace("abaa", "a", "z", 2)   = "zbza"
6320
     * StringUtils.replace("abaa", "a", "z", -1)  = "zbzz"
6321
     * </pre>
6322
     *
6323
     * @param text  text to search and replace in, may be null
6324
     * @param searchString  the String to search for, may be null
6325
     * @param replacement  the String to replace it with, may be null
6326
     * @param max  maximum number of values to replace, or {@code -1} if no maximum
6327
     * @return the text with any replacements processed,
6328
     *  {@code null} if null String input
6329
     */
6330
    public static String replace(final String text, final String searchString, final String replacement, final int max) {
6331 1 1. replace : mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replace(text, searchString, replacement, max, false);
6332
    }
6333
6334
    /**
6335
     * <p>Replaces a String with another String inside a larger String,
6336
     * for the first {@code max} values of the search String,
6337
     * case sensitively/insensisitively based on {@code ignoreCase} value.</p>
6338
     *
6339
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6340
     *
6341
     * <pre>
6342
     * StringUtils.replace(null, *, *, *, false)         = null
6343
     * StringUtils.replace("", *, *, *, false)           = ""
6344
     * StringUtils.replace("any", null, *, *, false)     = "any"
6345
     * StringUtils.replace("any", *, null, *, false)     = "any"
6346
     * StringUtils.replace("any", "", *, *, false)       = "any"
6347
     * StringUtils.replace("any", *, *, 0, false)        = "any"
6348
     * StringUtils.replace("abaa", "a", null, -1, false) = "abaa"
6349
     * StringUtils.replace("abaa", "a", "", -1, false)   = "b"
6350
     * StringUtils.replace("abaa", "a", "z", 0, false)   = "abaa"
6351
     * StringUtils.replace("abaa", "A", "z", 1, false)   = "abaa"
6352
     * StringUtils.replace("abaa", "A", "z", 1, true)   = "zbaa"
6353
     * StringUtils.replace("abAa", "a", "z", 2, true)   = "zbza"
6354
     * StringUtils.replace("abAa", "a", "z", -1, true)  = "zbzz"
6355
     * </pre>
6356
     *
6357
     * @param text  text to search and replace in, may be null
6358
     * @param searchString  the String to search for (case insensitive), may be null
6359
     * @param replacement  the String to replace it with, may be null
6360
     * @param max  maximum number of values to replace, or {@code -1} if no maximum
6361
     * @param ignoreCase if true replace is case insensitive, otherwise case sensitive
6362
     * @return the text with any replacements processed,
6363
     *  {@code null} if null String input
6364
     */
6365
     private static String replace(final String text, String searchString, final String replacement, int max, final boolean ignoreCase) {
6366 4 1. replace : negated conditional → TIMED_OUT
2. replace : negated conditional → KILLED
3. replace : negated conditional → KILLED
4. replace : negated conditional → KILLED
         if (isEmpty(text) || isEmpty(searchString) || replacement == null || max == 0) {
6367 1 1. replace : mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED
             return text;
6368
         }
6369
         String searchText = text;
6370 1 1. replace : negated conditional → KILLED
         if (ignoreCase) {
6371
             searchText = text.toLowerCase();
6372
             searchString = searchString.toLowerCase();
6373
         }
6374
         int start = 0;
6375
         int end = searchText.indexOf(searchString, start);
6376 1 1. replace : negated conditional → KILLED
         if (end == INDEX_NOT_FOUND) {
6377 1 1. replace : mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED
             return text;
6378
         }
6379
         final int replLength = searchString.length();
6380 1 1. replace : Replaced integer subtraction with addition → SURVIVED
         int increase = replacement.length() - replLength;
6381 2 1. replace : changed conditional boundary → SURVIVED
2. replace : negated conditional → KILLED
         increase = increase < 0 ? 0 : increase;
6382 5 1. replace : changed conditional boundary → SURVIVED
2. replace : changed conditional boundary → SURVIVED
3. replace : Replaced integer multiplication with division → SURVIVED
4. replace : negated conditional → SURVIVED
5. replace : negated conditional → SURVIVED
         increase *= max < 0 ? 16 : max > 64 ? 64 : max;
6383 1 1. replace : Replaced integer addition with subtraction → KILLED
         final StringBuilder buf = new StringBuilder(text.length() + increase);
6384 1 1. replace : negated conditional → KILLED
         while (end != INDEX_NOT_FOUND) {
6385
             buf.append(text, start, end).append(replacement);
6386 1 1. replace : Replaced integer addition with subtraction → KILLED
             start = end + replLength;
6387 2 1. replace : Changed increment from -1 to 1 → KILLED
2. replace : negated conditional → KILLED
             if (--max == 0) {
6388
                 break;
6389
             }
6390
             end = searchText.indexOf(searchString, start);
6391
         }
6392
         buf.append(text, start, text.length());
6393 1 1. replace : mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED
         return buf.toString();
6394
     }
6395
6396
    /**
6397
     * <p>Replaces each substring of the text String that matches the given regular expression
6398
     * with the given replacement.</p>
6399
     *
6400
     * This method is a {@code null} safe equivalent to:
6401
     * <ul>
6402
     *  <li>{@code text.replaceAll(regex, replacement)}</li>
6403
     *  <li>{@code Pattern.compile(regex).matcher(text).replaceAll(replacement)}</li>
6404
     * </ul>
6405
     *
6406
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6407
     *
6408
     * <p>Unlike in the {@link #replacePattern(String, String, String)} method, the {@link Pattern#DOTALL} option
6409
     * is NOT automatically added.
6410
     * To use the DOTALL option prepend <code>"(?s)"</code> to the regex.
6411
     * DOTALL is also known as single-line mode in Perl.</p>
6412
     *
6413
     * <pre>
6414
     * StringUtils.replaceAll(null, *, *)       = null
6415
     * StringUtils.replaceAll("any", (String) null, *)   = "any"
6416
     * StringUtils.replaceAll("any", *, null)   = "any"
6417
     * StringUtils.replaceAll("", "", "zzz")    = "zzz"
6418
     * StringUtils.replaceAll("", ".*", "zzz")  = "zzz"
6419
     * StringUtils.replaceAll("", ".+", "zzz")  = ""
6420
     * StringUtils.replaceAll("abc", "", "ZZ")  = "ZZaZZbZZcZZ"
6421
     * StringUtils.replaceAll("&lt;__&gt;\n&lt;__&gt;", "&lt;.*&gt;", "z")      = "z\nz"
6422
     * StringUtils.replaceAll("&lt;__&gt;\n&lt;__&gt;", "(?s)&lt;.*&gt;", "z")  = "z"
6423
     * StringUtils.replaceAll("ABCabc123", "[a-z]", "_")       = "ABC___123"
6424
     * StringUtils.replaceAll("ABCabc123", "[^A-Z0-9]+", "_")  = "ABC_123"
6425
     * StringUtils.replaceAll("ABCabc123", "[^A-Z0-9]+", "")   = "ABC123"
6426
     * StringUtils.replaceAll("Lorem ipsum  dolor   sit", "( +)([a-z]+)", "_$2")  = "Lorem_ipsum_dolor_sit"
6427
     * </pre>
6428
     *
6429
     * @param text  text to search and replace in, may be null
6430
     * @param regex  the regular expression to which this string is to be matched
6431
     * @param replacement  the string to be substituted for each match
6432
     * @return  the text with any replacements processed,
6433
     *              {@code null} if null String input
6434
     *
6435
     * @throws  java.util.regex.PatternSyntaxException
6436
     *              if the regular expression's syntax is invalid
6437
     *
6438
     * @see #replacePattern(String, String, String)
6439
     * @see String#replaceAll(String, String)
6440
     * @see java.util.regex.Pattern
6441
     * @see java.util.regex.Pattern#DOTALL
6442
     * @since 3.5
6443
     *
6444
     * @deprecated Moved to RegExUtils.
6445
     */
6446
    @Deprecated
6447
    public static String replaceAll(final String text, final String regex, final String replacement) {
6448 1 1. replaceAll : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceAll to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return RegExUtils.replaceAll(text, regex, replacement);
6449
    }
6450
6451
    // Replace, character based
6452
    //-----------------------------------------------------------------------
6453
    /**
6454
     * <p>Replaces all occurrences of a character in a String with another.
6455
     * This is a null-safe version of {@link String#replace(char, char)}.</p>
6456
     *
6457
     * <p>A {@code null} string input returns {@code null}.
6458
     * An empty ("") string input returns an empty string.</p>
6459
     *
6460
     * <pre>
6461
     * StringUtils.replaceChars(null, *, *)        = null
6462
     * StringUtils.replaceChars("", *, *)          = ""
6463
     * StringUtils.replaceChars("abcba", 'b', 'y') = "aycya"
6464
     * StringUtils.replaceChars("abcba", 'z', 'y') = "abcba"
6465
     * </pre>
6466
     *
6467
     * @param str  String to replace characters in, may be null
6468
     * @param searchChar  the character to search for, may be null
6469
     * @param replaceChar  the character to replace, may be null
6470
     * @return modified String, {@code null} if null string input
6471
     * @since 2.0
6472
     */
6473
    public static String replaceChars(final String str, final char searchChar, final char replaceChar) {
6474 1 1. replaceChars : negated conditional → KILLED
        if (str == null) {
6475 1 1. replaceChars : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
6476
        }
6477 1 1. replaceChars : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.replace(searchChar, replaceChar);
6478
    }
6479
6480
    /**
6481
     * <p>Replaces multiple characters in a String in one go.
6482
     * This method can also be used to delete characters.</p>
6483
     *
6484
     * <p>For example:<br>
6485
     * <code>replaceChars(&quot;hello&quot;, &quot;ho&quot;, &quot;jy&quot;) = jelly</code>.</p>
6486
     *
6487
     * <p>A {@code null} string input returns {@code null}.
6488
     * An empty ("") string input returns an empty string.
6489
     * A null or empty set of search characters returns the input string.</p>
6490
     *
6491
     * <p>The length of the search characters should normally equal the length
6492
     * of the replace characters.
6493
     * If the search characters is longer, then the extra search characters
6494
     * are deleted.
6495
     * If the search characters is shorter, then the extra replace characters
6496
     * are ignored.</p>
6497
     *
6498
     * <pre>
6499
     * StringUtils.replaceChars(null, *, *)           = null
6500
     * StringUtils.replaceChars("", *, *)             = ""
6501
     * StringUtils.replaceChars("abc", null, *)       = "abc"
6502
     * StringUtils.replaceChars("abc", "", *)         = "abc"
6503
     * StringUtils.replaceChars("abc", "b", null)     = "ac"
6504
     * StringUtils.replaceChars("abc", "b", "")       = "ac"
6505
     * StringUtils.replaceChars("abcba", "bc", "yz")  = "ayzya"
6506
     * StringUtils.replaceChars("abcba", "bc", "y")   = "ayya"
6507
     * StringUtils.replaceChars("abcba", "bc", "yzx") = "ayzya"
6508
     * </pre>
6509
     *
6510
     * @param str  String to replace characters in, may be null
6511
     * @param searchChars  a set of characters to search for, may be null
6512
     * @param replaceChars  a set of characters to replace, may be null
6513
     * @return modified String, {@code null} if null string input
6514
     * @since 2.0
6515
     */
6516
    public static String replaceChars(final String str, final String searchChars, String replaceChars) {
6517 2 1. replaceChars : negated conditional → KILLED
2. replaceChars : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(searchChars)) {
6518 1 1. replaceChars : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
6519
        }
6520 1 1. replaceChars : negated conditional → KILLED
        if (replaceChars == null) {
6521
            replaceChars = EMPTY;
6522
        }
6523
        boolean modified = false;
6524
        final int replaceCharsLength = replaceChars.length();
6525
        final int strLength = str.length();
6526
        final StringBuilder buf = new StringBuilder(strLength);
6527 3 1. replaceChars : changed conditional boundary → KILLED
2. replaceChars : Changed increment from 1 to -1 → KILLED
3. replaceChars : negated conditional → KILLED
        for (int i = 0; i < strLength; i++) {
6528
            final char ch = str.charAt(i);
6529
            final int index = searchChars.indexOf(ch);
6530 2 1. replaceChars : changed conditional boundary → KILLED
2. replaceChars : negated conditional → KILLED
            if (index >= 0) {
6531
                modified = true;
6532 2 1. replaceChars : changed conditional boundary → KILLED
2. replaceChars : negated conditional → KILLED
                if (index < replaceCharsLength) {
6533
                    buf.append(replaceChars.charAt(index));
6534
                }
6535
            } else {
6536
                buf.append(ch);
6537
            }
6538
        }
6539 1 1. replaceChars : negated conditional → KILLED
        if (modified) {
6540 1 1. replaceChars : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return buf.toString();
6541
        }
6542 1 1. replaceChars : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
6543
    }
6544
6545
    /**
6546
     * <p>
6547
     * Replaces all occurrences of Strings within another String.
6548
     * </p>
6549
     *
6550
     * <p>
6551
     * A {@code null} reference passed to this method is a no-op, or if
6552
     * any "search string" or "string to replace" is null, that replace will be
6553
     * ignored. This will not repeat. For repeating replaces, call the
6554
     * overloaded method.
6555
     * </p>
6556
     *
6557
     * <pre>
6558
     *  StringUtils.replaceEach(null, *, *)        = null
6559
     *  StringUtils.replaceEach("", *, *)          = ""
6560
     *  StringUtils.replaceEach("aba", null, null) = "aba"
6561
     *  StringUtils.replaceEach("aba", new String[0], null) = "aba"
6562
     *  StringUtils.replaceEach("aba", null, new String[0]) = "aba"
6563
     *  StringUtils.replaceEach("aba", new String[]{"a"}, null)  = "aba"
6564
     *  StringUtils.replaceEach("aba", new String[]{"a"}, new String[]{""})  = "b"
6565
     *  StringUtils.replaceEach("aba", new String[]{null}, new String[]{"a"})  = "aba"
6566
     *  StringUtils.replaceEach("abcde", new String[]{"ab", "d"}, new String[]{"w", "t"})  = "wcte"
6567
     *  (example of how it does not repeat)
6568
     *  StringUtils.replaceEach("abcde", new String[]{"ab", "d"}, new String[]{"d", "t"})  = "dcte"
6569
     * </pre>
6570
     *
6571
     * @param text
6572
     *            text to search and replace in, no-op if null
6573
     * @param searchList
6574
     *            the Strings to search for, no-op if null
6575
     * @param replacementList
6576
     *            the Strings to replace them with, no-op if null
6577
     * @return the text with any replacements processed, {@code null} if
6578
     *         null String input
6579
     * @throws IllegalArgumentException
6580
     *             if the lengths of the arrays are not the same (null is ok,
6581
     *             and/or size 0)
6582
     * @since 2.4
6583
     */
6584
    public static String replaceEach(final String text, final String[] searchList, final String[] replacementList) {
6585 1 1. replaceEach : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replaceEach(text, searchList, replacementList, false, 0);
6586
    }
6587
6588
    /**
6589
     * <p>
6590
     * Replace all occurrences of Strings within another String.
6591
     * This is a private recursive helper method for {@link #replaceEachRepeatedly(String, String[], String[])} and
6592
     * {@link #replaceEach(String, String[], String[])}
6593
     * </p>
6594
     *
6595
     * <p>
6596
     * A {@code null} reference passed to this method is a no-op, or if
6597
     * any "search string" or "string to replace" is null, that replace will be
6598
     * ignored.
6599
     * </p>
6600
     *
6601
     * <pre>
6602
     *  StringUtils.replaceEach(null, *, *, *, *) = null
6603
     *  StringUtils.replaceEach("", *, *, *, *) = ""
6604
     *  StringUtils.replaceEach("aba", null, null, *, *) = "aba"
6605
     *  StringUtils.replaceEach("aba", new String[0], null, *, *) = "aba"
6606
     *  StringUtils.replaceEach("aba", null, new String[0], *, *) = "aba"
6607
     *  StringUtils.replaceEach("aba", new String[]{"a"}, null, *, *) = "aba"
6608
     *  StringUtils.replaceEach("aba", new String[]{"a"}, new String[]{""}, *, >=0) = "b"
6609
     *  StringUtils.replaceEach("aba", new String[]{null}, new String[]{"a"}, *, >=0) = "aba"
6610
     *  StringUtils.replaceEach("abcde", new String[]{"ab", "d"}, new String[]{"w", "t"}, *, >=0) = "wcte"
6611
     *  (example of how it repeats)
6612
     *  StringUtils.replaceEach("abcde", new String[]{"ab", "d"}, new String[]{"d", "t"}, false, >=0) = "dcte"
6613
     *  StringUtils.replaceEach("abcde", new String[]{"ab", "d"}, new String[]{"d", "t"}, true, >=2) = "tcte"
6614
     *  StringUtils.replaceEach("abcde", new String[]{"ab", "d"}, new String[]{"d", "ab"}, *, *) = IllegalStateException
6615
     * </pre>
6616
     *
6617
     * @param text
6618
     *            text to search and replace in, no-op if null
6619
     * @param searchList
6620
     *            the Strings to search for, no-op if null
6621
     * @param replacementList
6622
     *            the Strings to replace them with, no-op if null
6623
     * @param repeat if true, then replace repeatedly
6624
     *       until there are no more possible replacements or timeToLive < 0
6625
     * @param timeToLive
6626
     *            if less than 0 then there is a circular reference and endless
6627
     *            loop
6628
     * @return the text with any replacements processed, {@code null} if
6629
     *         null String input
6630
     * @throws IllegalStateException
6631
     *             if the search is repeating and there is an endless loop due
6632
     *             to outputs of one being inputs to another
6633
     * @throws IllegalArgumentException
6634
     *             if the lengths of the arrays are not the same (null is ok,
6635
     *             and/or size 0)
6636
     * @since 2.4
6637
     */
6638
    private static String replaceEach(
6639
            final String text, final String[] searchList, final String[] replacementList, final boolean repeat, final int timeToLive) {
6640
6641
        // mchyzer Performance note: This creates very few new objects (one major goal)
6642
        // let me know if there are performance requests, we can create a harness to measure
6643
6644 6 1. replaceEach : negated conditional → KILLED
2. replaceEach : negated conditional → KILLED
3. replaceEach : negated conditional → KILLED
4. replaceEach : negated conditional → KILLED
5. replaceEach : negated conditional → KILLED
6. replaceEach : negated conditional → KILLED
        if (text == null || text.isEmpty() || searchList == null ||
6645
                searchList.length == 0 || replacementList == null || replacementList.length == 0) {
6646 1 1. replaceEach : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return text;
6647
        }
6648
6649
        // if recursing, this shouldn't be less than 0
6650 2 1. replaceEach : changed conditional boundary → KILLED
2. replaceEach : negated conditional → KILLED
        if (timeToLive < 0) {
6651
            throw new IllegalStateException("Aborting to protect against StackOverflowError - " +
6652
                                            "output of one loop is the input of another");
6653
        }
6654
6655
        final int searchLength = searchList.length;
6656
        final int replacementLength = replacementList.length;
6657
6658
        // make sure lengths are ok, these need to be equal
6659 1 1. replaceEach : negated conditional → KILLED
        if (searchLength != replacementLength) {
6660
            throw new IllegalArgumentException("Search and Replace array lengths don't match: "
6661
                + searchLength
6662
                + " vs "
6663
                + replacementLength);
6664
        }
6665
6666
        // keep track of which still have matches
6667
        final boolean[] noMoreMatchesForReplIndex = new boolean[searchLength];
6668
6669
        // index on index that the match was found
6670
        int textIndex = -1;
6671
        int replaceIndex = -1;
6672
        int tempIndex = -1;
6673
6674
        // index of replace array that will replace the search string found
6675
        // NOTE: logic duplicated below START
6676 3 1. replaceEach : changed conditional boundary → KILLED
2. replaceEach : Changed increment from 1 to -1 → KILLED
3. replaceEach : negated conditional → KILLED
        for (int i = 0; i < searchLength; i++) {
6677 2 1. replaceEach : negated conditional → KILLED
2. replaceEach : negated conditional → KILLED
            if (noMoreMatchesForReplIndex[i] || searchList[i] == null ||
6678 2 1. replaceEach : negated conditional → KILLED
2. replaceEach : negated conditional → KILLED
                    searchList[i].isEmpty() || replacementList[i] == null) {
6679
                continue;
6680
            }
6681
            tempIndex = text.indexOf(searchList[i]);
6682
6683
            // see if we need to keep searching for this
6684 1 1. replaceEach : negated conditional → KILLED
            if (tempIndex == -1) {
6685
                noMoreMatchesForReplIndex[i] = true;
6686
            } else {
6687 3 1. replaceEach : changed conditional boundary → SURVIVED
2. replaceEach : negated conditional → KILLED
3. replaceEach : negated conditional → KILLED
                if (textIndex == -1 || tempIndex < textIndex) {
6688
                    textIndex = tempIndex;
6689
                    replaceIndex = i;
6690
                }
6691
            }
6692
        }
6693
        // NOTE: logic mostly below END
6694
6695
        // no search strings found, we are done
6696 1 1. replaceEach : negated conditional → KILLED
        if (textIndex == -1) {
6697 1 1. replaceEach : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return text;
6698
        }
6699
6700
        int start = 0;
6701
6702
        // get a good guess on the size of the result buffer so it doesn't have to double if it goes over a bit
6703
        int increase = 0;
6704
6705
        // count the replacement text elements that are larger than their corresponding text being replaced
6706 3 1. replaceEach : negated conditional → SURVIVED
2. replaceEach : changed conditional boundary → KILLED
3. replaceEach : Changed increment from 1 to -1 → KILLED
        for (int i = 0; i < searchList.length; i++) {
6707 2 1. replaceEach : negated conditional → SURVIVED
2. replaceEach : negated conditional → KILLED
            if (searchList[i] == null || replacementList[i] == null) {
6708
                continue;
6709
            }
6710 1 1. replaceEach : Replaced integer subtraction with addition → SURVIVED
            final int greater = replacementList[i].length() - searchList[i].length();
6711 2 1. replaceEach : changed conditional boundary → SURVIVED
2. replaceEach : negated conditional → SURVIVED
            if (greater > 0) {
6712 2 1. replaceEach : Replaced integer multiplication with division → SURVIVED
2. replaceEach : Replaced integer addition with subtraction → SURVIVED
                increase += 3 * greater; // assume 3 matches
6713
            }
6714
        }
6715
        // have upper-bound at 20% increase, then let Java take over
6716 1 1. replaceEach : Replaced integer division with multiplication → SURVIVED
        increase = Math.min(increase, text.length() / 5);
6717
6718 1 1. replaceEach : Replaced integer addition with subtraction → SURVIVED
        final StringBuilder buf = new StringBuilder(text.length() + increase);
6719
6720 1 1. replaceEach : negated conditional → KILLED
        while (textIndex != -1) {
6721
6722 3 1. replaceEach : changed conditional boundary → KILLED
2. replaceEach : Changed increment from 1 to -1 → KILLED
3. replaceEach : negated conditional → KILLED
            for (int i = start; i < textIndex; i++) {
6723
                buf.append(text.charAt(i));
6724
            }
6725
            buf.append(replacementList[replaceIndex]);
6726
6727 1 1. replaceEach : Replaced integer addition with subtraction → KILLED
            start = textIndex + searchList[replaceIndex].length();
6728
6729
            textIndex = -1;
6730
            replaceIndex = -1;
6731
            tempIndex = -1;
6732
            // find the next earliest match
6733
            // NOTE: logic mostly duplicated above START
6734 3 1. replaceEach : changed conditional boundary → KILLED
2. replaceEach : Changed increment from 1 to -1 → KILLED
3. replaceEach : negated conditional → KILLED
            for (int i = 0; i < searchLength; i++) {
6735 2 1. replaceEach : negated conditional → KILLED
2. replaceEach : negated conditional → KILLED
                if (noMoreMatchesForReplIndex[i] || searchList[i] == null ||
6736 2 1. replaceEach : negated conditional → KILLED
2. replaceEach : negated conditional → KILLED
                        searchList[i].isEmpty() || replacementList[i] == null) {
6737
                    continue;
6738
                }
6739
                tempIndex = text.indexOf(searchList[i], start);
6740
6741
                // see if we need to keep searching for this
6742 1 1. replaceEach : negated conditional → KILLED
                if (tempIndex == -1) {
6743
                    noMoreMatchesForReplIndex[i] = true;
6744
                } else {
6745 3 1. replaceEach : changed conditional boundary → SURVIVED
2. replaceEach : negated conditional → KILLED
3. replaceEach : negated conditional → KILLED
                    if (textIndex == -1 || tempIndex < textIndex) {
6746
                        textIndex = tempIndex;
6747
                        replaceIndex = i;
6748
                    }
6749
                }
6750
            }
6751
            // NOTE: logic duplicated above END
6752
6753
        }
6754
        final int textLength = text.length();
6755 3 1. replaceEach : changed conditional boundary → KILLED
2. replaceEach : Changed increment from 1 to -1 → KILLED
3. replaceEach : negated conditional → KILLED
        for (int i = start; i < textLength; i++) {
6756
            buf.append(text.charAt(i));
6757
        }
6758
        final String result = buf.toString();
6759 1 1. replaceEach : negated conditional → KILLED
        if (!repeat) {
6760 1 1. replaceEach : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return result;
6761
        }
6762
6763 2 1. replaceEach : Replaced integer subtraction with addition → KILLED
2. replaceEach : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replaceEach(result, searchList, replacementList, repeat, timeToLive - 1);
6764
    }
6765
6766
    /**
6767
     * <p>
6768
     * Replaces all occurrences of Strings within another String.
6769
     * </p>
6770
     *
6771
     * <p>
6772
     * A {@code null} reference passed to this method is a no-op, or if
6773
     * any "search string" or "string to replace" is null, that replace will be
6774
     * ignored.
6775
     * </p>
6776
     *
6777
     * <pre>
6778
     *  StringUtils.replaceEachRepeatedly(null, *, *) = null
6779
     *  StringUtils.replaceEachRepeatedly("", *, *) = ""
6780
     *  StringUtils.replaceEachRepeatedly("aba", null, null) = "aba"
6781
     *  StringUtils.replaceEachRepeatedly("aba", new String[0], null) = "aba"
6782
     *  StringUtils.replaceEachRepeatedly("aba", null, new String[0]) = "aba"
6783
     *  StringUtils.replaceEachRepeatedly("aba", new String[]{"a"}, null) = "aba"
6784
     *  StringUtils.replaceEachRepeatedly("aba", new String[]{"a"}, new String[]{""}) = "b"
6785
     *  StringUtils.replaceEachRepeatedly("aba", new String[]{null}, new String[]{"a"}) = "aba"
6786
     *  StringUtils.replaceEachRepeatedly("abcde", new String[]{"ab", "d"}, new String[]{"w", "t"}) = "wcte"
6787
     *  (example of how it repeats)
6788
     *  StringUtils.replaceEachRepeatedly("abcde", new String[]{"ab", "d"}, new String[]{"d", "t"}) = "tcte"
6789
     *  StringUtils.replaceEachRepeatedly("abcde", new String[]{"ab", "d"}, new String[]{"d", "ab"}) = IllegalStateException
6790
     * </pre>
6791
     *
6792
     * @param text
6793
     *            text to search and replace in, no-op if null
6794
     * @param searchList
6795
     *            the Strings to search for, no-op if null
6796
     * @param replacementList
6797
     *            the Strings to replace them with, no-op if null
6798
     * @return the text with any replacements processed, {@code null} if
6799
     *         null String input
6800
     * @throws IllegalStateException
6801
     *             if the search is repeating and there is an endless loop due
6802
     *             to outputs of one being inputs to another
6803
     * @throws IllegalArgumentException
6804
     *             if the lengths of the arrays are not the same (null is ok,
6805
     *             and/or size 0)
6806
     * @since 2.4
6807
     */
6808
    public static String replaceEachRepeatedly(final String text, final String[] searchList, final String[] replacementList) {
6809
        // timeToLive should be 0 if not used or nothing to replace, else it's
6810
        // the length of the replace array
6811 1 1. replaceEachRepeatedly : negated conditional → KILLED
        final int timeToLive = searchList == null ? 0 : searchList.length;
6812 1 1. replaceEachRepeatedly : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEachRepeatedly to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replaceEach(text, searchList, replacementList, true, timeToLive);
6813
    }
6814
6815
    /**
6816
     * <p>Replaces the first substring of the text string that matches the given regular expression
6817
     * with the given replacement.</p>
6818
     *
6819
     * This method is a {@code null} safe equivalent to:
6820
     * <ul>
6821
     *  <li>{@code text.replaceFirst(regex, replacement)}</li>
6822
     *  <li>{@code Pattern.compile(regex).matcher(text).replaceFirst(replacement)}</li>
6823
     * </ul>
6824
     *
6825
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6826
     *
6827
     * <p>The {@link Pattern#DOTALL} option is NOT automatically added.
6828
     * To use the DOTALL option prepend <code>"(?s)"</code> to the regex.
6829
     * DOTALL is also known as single-line mode in Perl.</p>
6830
     *
6831
     * <pre>
6832
     * StringUtils.replaceFirst(null, *, *)       = null
6833
     * StringUtils.replaceFirst("any", (String) null, *)   = "any"
6834
     * StringUtils.replaceFirst("any", *, null)   = "any"
6835
     * StringUtils.replaceFirst("", "", "zzz")    = "zzz"
6836
     * StringUtils.replaceFirst("", ".*", "zzz")  = "zzz"
6837
     * StringUtils.replaceFirst("", ".+", "zzz")  = ""
6838
     * StringUtils.replaceFirst("abc", "", "ZZ")  = "ZZabc"
6839
     * StringUtils.replaceFirst("&lt;__&gt;\n&lt;__&gt;", "&lt;.*&gt;", "z")      = "z\n&lt;__&gt;"
6840
     * StringUtils.replaceFirst("&lt;__&gt;\n&lt;__&gt;", "(?s)&lt;.*&gt;", "z")  = "z"
6841
     * StringUtils.replaceFirst("ABCabc123", "[a-z]", "_")          = "ABC_bc123"
6842
     * StringUtils.replaceFirst("ABCabc123abc", "[^A-Z0-9]+", "_")  = "ABC_123abc"
6843
     * StringUtils.replaceFirst("ABCabc123abc", "[^A-Z0-9]+", "")   = "ABC123abc"
6844
     * StringUtils.replaceFirst("Lorem ipsum  dolor   sit", "( +)([a-z]+)", "_$2")  = "Lorem_ipsum  dolor   sit"
6845
     * </pre>
6846
     *
6847
     * @param text  text to search and replace in, may be null
6848
     * @param regex  the regular expression to which this string is to be matched
6849
     * @param replacement  the string to be substituted for the first match
6850
     * @return  the text with the first replacement processed,
6851
     *              {@code null} if null String input
6852
     *
6853
     * @throws  java.util.regex.PatternSyntaxException
6854
     *              if the regular expression's syntax is invalid
6855
     *
6856
     * @see String#replaceFirst(String, String)
6857
     * @see java.util.regex.Pattern
6858
     * @see java.util.regex.Pattern#DOTALL
6859
     * @since 3.5
6860
     *
6861
     * @deprecated Moved to RegExUtils.
6862
     */
6863
    @Deprecated
6864
    public static String replaceFirst(final String text, final String regex, final String replacement) {
6865 1 1. replaceFirst : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceFirst to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return RegExUtils.replaceFirst(text, regex, replacement);
6866
    }
6867
6868
    /**
6869
    * <p>Case insensitively replaces all occurrences of a String within another String.</p>
6870
    *
6871
    * <p>A {@code null} reference passed to this method is a no-op.</p>
6872
    *
6873
    * <pre>
6874
    * StringUtils.replaceIgnoreCase(null, *, *)        = null
6875
    * StringUtils.replaceIgnoreCase("", *, *)          = ""
6876
    * StringUtils.replaceIgnoreCase("any", null, *)    = "any"
6877
    * StringUtils.replaceIgnoreCase("any", *, null)    = "any"
6878
    * StringUtils.replaceIgnoreCase("any", "", *)      = "any"
6879
    * StringUtils.replaceIgnoreCase("aba", "a", null)  = "aba"
6880
    * StringUtils.replaceIgnoreCase("abA", "A", "")    = "b"
6881
    * StringUtils.replaceIgnoreCase("aba", "A", "z")   = "zbz"
6882
    * </pre>
6883
    *
6884
    * @see #replaceIgnoreCase(String text, String searchString, String replacement, int max)
6885
    * @param text  text to search and replace in, may be null
6886
    * @param searchString  the String to search for (case insensitive), may be null
6887
    * @param replacement  the String to replace it with, may be null
6888
    * @return the text with any replacements processed,
6889
    *  {@code null} if null String input
6890
    * @since 3.5
6891
    */
6892
   public static String replaceIgnoreCase(final String text, final String searchString, final String replacement) {
6893 1 1. replaceIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
       return replaceIgnoreCase(text, searchString, replacement, -1);
6894
   }
6895
6896
    /**
6897
     * <p>Case insensitively replaces a String with another String inside a larger String,
6898
     * for the first {@code max} values of the search String.</p>
6899
     *
6900
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6901
     *
6902
     * <pre>
6903
     * StringUtils.replaceIgnoreCase(null, *, *, *)         = null
6904
     * StringUtils.replaceIgnoreCase("", *, *, *)           = ""
6905
     * StringUtils.replaceIgnoreCase("any", null, *, *)     = "any"
6906
     * StringUtils.replaceIgnoreCase("any", *, null, *)     = "any"
6907
     * StringUtils.replaceIgnoreCase("any", "", *, *)       = "any"
6908
     * StringUtils.replaceIgnoreCase("any", *, *, 0)        = "any"
6909
     * StringUtils.replaceIgnoreCase("abaa", "a", null, -1) = "abaa"
6910
     * StringUtils.replaceIgnoreCase("abaa", "a", "", -1)   = "b"
6911
     * StringUtils.replaceIgnoreCase("abaa", "a", "z", 0)   = "abaa"
6912
     * StringUtils.replaceIgnoreCase("abaa", "A", "z", 1)   = "zbaa"
6913
     * StringUtils.replaceIgnoreCase("abAa", "a", "z", 2)   = "zbza"
6914
     * StringUtils.replaceIgnoreCase("abAa", "a", "z", -1)  = "zbzz"
6915
     * </pre>
6916
     *
6917
     * @param text  text to search and replace in, may be null
6918
     * @param searchString  the String to search for (case insensitive), may be null
6919
     * @param replacement  the String to replace it with, may be null
6920
     * @param max  maximum number of values to replace, or {@code -1} if no maximum
6921
     * @return the text with any replacements processed,
6922
     *  {@code null} if null String input
6923
     * @since 3.5
6924
     */
6925
    public static String replaceIgnoreCase(final String text, final String searchString, final String replacement, final int max) {
6926 1 1. replaceIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replace(text, searchString, replacement, max, true);
6927
    }
6928
6929
    // Replacing
6930
    //-----------------------------------------------------------------------
6931
    /**
6932
     * <p>Replaces a String with another String inside a larger String, once.</p>
6933
     *
6934
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6935
     *
6936
     * <pre>
6937
     * StringUtils.replaceOnce(null, *, *)        = null
6938
     * StringUtils.replaceOnce("", *, *)          = ""
6939
     * StringUtils.replaceOnce("any", null, *)    = "any"
6940
     * StringUtils.replaceOnce("any", *, null)    = "any"
6941
     * StringUtils.replaceOnce("any", "", *)      = "any"
6942
     * StringUtils.replaceOnce("aba", "a", null)  = "aba"
6943
     * StringUtils.replaceOnce("aba", "a", "")    = "ba"
6944
     * StringUtils.replaceOnce("aba", "a", "z")   = "zba"
6945
     * </pre>
6946
     *
6947
     * @see #replace(String text, String searchString, String replacement, int max)
6948
     * @param text  text to search and replace in, may be null
6949
     * @param searchString  the String to search for, may be null
6950
     * @param replacement  the String to replace with, may be null
6951
     * @return the text with any replacements processed,
6952
     *  {@code null} if null String input
6953
     */
6954
    public static String replaceOnce(final String text, final String searchString, final String replacement) {
6955 1 1. replaceOnce : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceOnce to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replace(text, searchString, replacement, 1);
6956
    }
6957
6958
    /**
6959
     * <p>Case insensitively replaces a String with another String inside a larger String, once.</p>
6960
     *
6961
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6962
     *
6963
     * <pre>
6964
     * StringUtils.replaceOnceIgnoreCase(null, *, *)        = null
6965
     * StringUtils.replaceOnceIgnoreCase("", *, *)          = ""
6966
     * StringUtils.replaceOnceIgnoreCase("any", null, *)    = "any"
6967
     * StringUtils.replaceOnceIgnoreCase("any", *, null)    = "any"
6968
     * StringUtils.replaceOnceIgnoreCase("any", "", *)      = "any"
6969
     * StringUtils.replaceOnceIgnoreCase("aba", "a", null)  = "aba"
6970
     * StringUtils.replaceOnceIgnoreCase("aba", "a", "")    = "ba"
6971
     * StringUtils.replaceOnceIgnoreCase("aba", "a", "z")   = "zba"
6972
     * StringUtils.replaceOnceIgnoreCase("FoOFoofoo", "foo", "") = "Foofoo"
6973
     * </pre>
6974
     *
6975
     * @see #replaceIgnoreCase(String text, String searchString, String replacement, int max)
6976
     * @param text  text to search and replace in, may be null
6977
     * @param searchString  the String to search for (case insensitive), may be null
6978
     * @param replacement  the String to replace with, may be null
6979
     * @return the text with any replacements processed,
6980
     *  {@code null} if null String input
6981
     * @since 3.5
6982
     */
6983
    public static String replaceOnceIgnoreCase(final String text, final String searchString, final String replacement) {
6984 1 1. replaceOnceIgnoreCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceOnceIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return replaceIgnoreCase(text, searchString, replacement, 1);
6985
    }
6986
6987
    /**
6988
     * <p>Replaces each substring of the source String that matches the given regular expression with the given
6989
     * replacement using the {@link Pattern#DOTALL} option. DOTALL is also known as single-line mode in Perl.</p>
6990
     *
6991
     * This call is a {@code null} safe equivalent to:
6992
     * <ul>
6993
     * <li>{@code source.replaceAll(&quot;(?s)&quot; + regex, replacement)}</li>
6994
     * <li>{@code Pattern.compile(regex, Pattern.DOTALL).matcher(source).replaceAll(replacement)}</li>
6995
     * </ul>
6996
     *
6997
     * <p>A {@code null} reference passed to this method is a no-op.</p>
6998
     *
6999
     * <pre>
7000
     * StringUtils.replacePattern(null, *, *)       = null
7001
     * StringUtils.replacePattern("any", (String) null, *)   = "any"
7002
     * StringUtils.replacePattern("any", *, null)   = "any"
7003
     * StringUtils.replacePattern("", "", "zzz")    = "zzz"
7004
     * StringUtils.replacePattern("", ".*", "zzz")  = "zzz"
7005
     * StringUtils.replacePattern("", ".+", "zzz")  = ""
7006
     * StringUtils.replacePattern("&lt;__&gt;\n&lt;__&gt;", "&lt;.*&gt;", "z")       = "z"
7007
     * StringUtils.replacePattern("ABCabc123", "[a-z]", "_")       = "ABC___123"
7008
     * StringUtils.replacePattern("ABCabc123", "[^A-Z0-9]+", "_")  = "ABC_123"
7009
     * StringUtils.replacePattern("ABCabc123", "[^A-Z0-9]+", "")   = "ABC123"
7010
     * StringUtils.replacePattern("Lorem ipsum  dolor   sit", "( +)([a-z]+)", "_$2")  = "Lorem_ipsum_dolor_sit"
7011
     * </pre>
7012
     *
7013
     * @param source
7014
     *            the source string
7015
     * @param regex
7016
     *            the regular expression to which this string is to be matched
7017
     * @param replacement
7018
     *            the string to be substituted for each match
7019
     * @return The resulting {@code String}
7020
     * @see #replaceAll(String, String, String)
7021
     * @see String#replaceAll(String, String)
7022
     * @see Pattern#DOTALL
7023
     * @since 3.2
7024
     * @since 3.5 Changed {@code null} reference passed to this method is a no-op.
7025
     *
7026
     * @deprecated Moved to RegExUtils.
7027
     */
7028
    @Deprecated
7029
    public static String replacePattern(final String source, final String regex, final String replacement) {
7030 1 1. replacePattern : mutated return of Object value for org/apache/commons/lang3/StringUtils::replacePattern to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return RegExUtils.replacePattern(source, regex, replacement);
7031
    }
7032
7033
    // Reversing
7034
    //-----------------------------------------------------------------------
7035
    /**
7036
     * <p>Reverses a String as per {@link StringBuilder#reverse()}.</p>
7037
     *
7038
     * <p>A {@code null} String returns {@code null}.</p>
7039
     *
7040
     * <pre>
7041
     * StringUtils.reverse(null)  = null
7042
     * StringUtils.reverse("")    = ""
7043
     * StringUtils.reverse("bat") = "tab"
7044
     * </pre>
7045
     *
7046
     * @param str  the String to reverse, may be null
7047
     * @return the reversed String, {@code null} if null String input
7048
     */
7049
    public static String reverse(final String str) {
7050 1 1. reverse : negated conditional → KILLED
        if (str == null) {
7051 1 1. reverse : mutated return of Object value for org/apache/commons/lang3/StringUtils::reverse to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7052
        }
7053 1 1. reverse : mutated return of Object value for org/apache/commons/lang3/StringUtils::reverse to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new StringBuilder(str).reverse().toString();
7054
    }
7055
7056
    /**
7057
     * <p>Reverses a String that is delimited by a specific character.</p>
7058
     *
7059
     * <p>The Strings between the delimiters are not reversed.
7060
     * Thus java.lang.String becomes String.lang.java (if the delimiter
7061
     * is {@code '.'}).</p>
7062
     *
7063
     * <pre>
7064
     * StringUtils.reverseDelimited(null, *)      = null
7065
     * StringUtils.reverseDelimited("", *)        = ""
7066
     * StringUtils.reverseDelimited("a.b.c", 'x') = "a.b.c"
7067
     * StringUtils.reverseDelimited("a.b.c", ".") = "c.b.a"
7068
     * </pre>
7069
     *
7070
     * @param str  the String to reverse, may be null
7071
     * @param separatorChar  the separator character to use
7072
     * @return the reversed String, {@code null} if null String input
7073
     * @since 2.0
7074
     */
7075
    public static String reverseDelimited(final String str, final char separatorChar) {
7076 1 1. reverseDelimited : negated conditional → KILLED
        if (str == null) {
7077 1 1. reverseDelimited : mutated return of Object value for org/apache/commons/lang3/StringUtils::reverseDelimited to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7078
        }
7079
        // could implement manually, but simple way is to reuse other,
7080
        // probably slower, methods.
7081
        final String[] strs = split(str, separatorChar);
7082 1 1. reverseDelimited : removed call to org/apache/commons/lang3/ArrayUtils::reverse → KILLED
        ArrayUtils.reverse(strs);
7083 1 1. reverseDelimited : mutated return of Object value for org/apache/commons/lang3/StringUtils::reverseDelimited to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return join(strs, separatorChar);
7084
    }
7085
7086
    /**
7087
     * <p>Gets the rightmost {@code len} characters of a String.</p>
7088
     *
7089
     * <p>If {@code len} characters are not available, or the String
7090
     * is {@code null}, the String will be returned without an
7091
     * an exception. An empty String is returned if len is negative.</p>
7092
     *
7093
     * <pre>
7094
     * StringUtils.right(null, *)    = null
7095
     * StringUtils.right(*, -ve)     = ""
7096
     * StringUtils.right("", *)      = ""
7097
     * StringUtils.right("abc", 0)   = ""
7098
     * StringUtils.right("abc", 2)   = "bc"
7099
     * StringUtils.right("abc", 4)   = "abc"
7100
     * </pre>
7101
     *
7102
     * @param str  the String to get the rightmost characters from, may be null
7103
     * @param len  the length of the required String
7104
     * @return the rightmost characters, {@code null} if null String input
7105
     */
7106
    public static String right(final String str, final int len) {
7107 1 1. right : negated conditional → KILLED
        if (str == null) {
7108 1 1. right : mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7109
        }
7110 2 1. right : changed conditional boundary → SURVIVED
2. right : negated conditional → KILLED
        if (len < 0) {
7111 1 1. right : mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
7112
        }
7113 2 1. right : changed conditional boundary → SURVIVED
2. right : negated conditional → KILLED
        if (str.length() <= len) {
7114 1 1. right : mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
7115
        }
7116 2 1. right : Replaced integer subtraction with addition → KILLED
2. right : mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(str.length() - len);
7117
    }
7118
7119
    /**
7120
     * <p>Right pad a String with spaces (' ').</p>
7121
     *
7122
     * <p>The String is padded to the size of {@code size}.</p>
7123
     *
7124
     * <pre>
7125
     * StringUtils.rightPad(null, *)   = null
7126
     * StringUtils.rightPad("", 3)     = "   "
7127
     * StringUtils.rightPad("bat", 3)  = "bat"
7128
     * StringUtils.rightPad("bat", 5)  = "bat  "
7129
     * StringUtils.rightPad("bat", 1)  = "bat"
7130
     * StringUtils.rightPad("bat", -1) = "bat"
7131
     * </pre>
7132
     *
7133
     * @param str  the String to pad out, may be null
7134
     * @param size  the size to pad to
7135
     * @return right padded String or original String if no padding is necessary,
7136
     *  {@code null} if null String input
7137
     */
7138
    public static String rightPad(final String str, final int size) {
7139 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return rightPad(str, size, ' ');
7140
    }
7141
7142
    /**
7143
     * <p>Right pad a String with a specified character.</p>
7144
     *
7145
     * <p>The String is padded to the size of {@code size}.</p>
7146
     *
7147
     * <pre>
7148
     * StringUtils.rightPad(null, *, *)     = null
7149
     * StringUtils.rightPad("", 3, 'z')     = "zzz"
7150
     * StringUtils.rightPad("bat", 3, 'z')  = "bat"
7151
     * StringUtils.rightPad("bat", 5, 'z')  = "batzz"
7152
     * StringUtils.rightPad("bat", 1, 'z')  = "bat"
7153
     * StringUtils.rightPad("bat", -1, 'z') = "bat"
7154
     * </pre>
7155
     *
7156
     * @param str  the String to pad out, may be null
7157
     * @param size  the size to pad to
7158
     * @param padChar  the character to pad with
7159
     * @return right padded String or original String if no padding is necessary,
7160
     *  {@code null} if null String input
7161
     * @since 2.0
7162
     */
7163
    public static String rightPad(final String str, final int size, final char padChar) {
7164 1 1. rightPad : negated conditional → KILLED
        if (str == null) {
7165 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7166
        }
7167 1 1. rightPad : Replaced integer subtraction with addition → KILLED
        final int pads = size - str.length();
7168 2 1. rightPad : changed conditional boundary → SURVIVED
2. rightPad : negated conditional → KILLED
        if (pads <= 0) {
7169 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str; // returns original String when possible
7170
        }
7171 2 1. rightPad : changed conditional boundary → SURVIVED
2. rightPad : negated conditional → KILLED
        if (pads > PAD_LIMIT) {
7172 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return rightPad(str, size, String.valueOf(padChar));
7173
        }
7174 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.concat(repeat(padChar, pads));
7175
    }
7176
7177
    /**
7178
     * <p>Right pad a String with a specified String.</p>
7179
     *
7180
     * <p>The String is padded to the size of {@code size}.</p>
7181
     *
7182
     * <pre>
7183
     * StringUtils.rightPad(null, *, *)      = null
7184
     * StringUtils.rightPad("", 3, "z")      = "zzz"
7185
     * StringUtils.rightPad("bat", 3, "yz")  = "bat"
7186
     * StringUtils.rightPad("bat", 5, "yz")  = "batyz"
7187
     * StringUtils.rightPad("bat", 8, "yz")  = "batyzyzy"
7188
     * StringUtils.rightPad("bat", 1, "yz")  = "bat"
7189
     * StringUtils.rightPad("bat", -1, "yz") = "bat"
7190
     * StringUtils.rightPad("bat", 5, null)  = "bat  "
7191
     * StringUtils.rightPad("bat", 5, "")    = "bat  "
7192
     * </pre>
7193
     *
7194
     * @param str  the String to pad out, may be null
7195
     * @param size  the size to pad to
7196
     * @param padStr  the String to pad with, null or empty treated as single space
7197
     * @return right padded String or original String if no padding is necessary,
7198
     *  {@code null} if null String input
7199
     */
7200
    public static String rightPad(final String str, final int size, String padStr) {
7201 1 1. rightPad : negated conditional → KILLED
        if (str == null) {
7202 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7203
        }
7204 1 1. rightPad : negated conditional → KILLED
        if (isEmpty(padStr)) {
7205
            padStr = SPACE;
7206
        }
7207
        final int padLen = padStr.length();
7208
        final int strLen = str.length();
7209 1 1. rightPad : Replaced integer subtraction with addition → KILLED
        final int pads = size - strLen;
7210 2 1. rightPad : changed conditional boundary → SURVIVED
2. rightPad : negated conditional → KILLED
        if (pads <= 0) {
7211 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str; // returns original String when possible
7212
        }
7213 3 1. rightPad : changed conditional boundary → SURVIVED
2. rightPad : negated conditional → KILLED
3. rightPad : negated conditional → KILLED
        if (padLen == 1 && pads <= PAD_LIMIT) {
7214 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return rightPad(str, size, padStr.charAt(0));
7215
        }
7216
7217 1 1. rightPad : negated conditional → KILLED
        if (pads == padLen) {
7218 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.concat(padStr);
7219 2 1. rightPad : changed conditional boundary → SURVIVED
2. rightPad : negated conditional → KILLED
        } else if (pads < padLen) {
7220 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.concat(padStr.substring(0, pads));
7221
        } else {
7222
            final char[] padding = new char[pads];
7223
            final char[] padChars = padStr.toCharArray();
7224 3 1. rightPad : changed conditional boundary → KILLED
2. rightPad : Changed increment from 1 to -1 → KILLED
3. rightPad : negated conditional → KILLED
            for (int i = 0; i < pads; i++) {
7225 1 1. rightPad : Replaced integer modulus with multiplication → KILLED
                padding[i] = padChars[i % padLen];
7226
            }
7227 1 1. rightPad : mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.concat(new String(padding));
7228
        }
7229
    }
7230
7231
    // Rotating (circular shift)
7232
    //-----------------------------------------------------------------------
7233
    /**
7234
     * <p>Rotate (circular shift) a String of {@code shift} characters.</p>
7235
     * <ul>
7236
     *  <li>If {@code shift > 0}, right circular shift (ex : ABCDEF =&gt; FABCDE)</li>
7237
     *  <li>If {@code shift < 0}, left circular shift (ex : ABCDEF =&gt; BCDEFA)</li>
7238
     * </ul>
7239
     *
7240
     * <pre>
7241
     * StringUtils.rotate(null, *)        = null
7242
     * StringUtils.rotate("", *)          = ""
7243
     * StringUtils.rotate("abcdefg", 0)   = "abcdefg"
7244
     * StringUtils.rotate("abcdefg", 2)   = "fgabcde"
7245
     * StringUtils.rotate("abcdefg", -2)  = "cdefgab"
7246
     * StringUtils.rotate("abcdefg", 7)   = "abcdefg"
7247
     * StringUtils.rotate("abcdefg", -7)  = "abcdefg"
7248
     * StringUtils.rotate("abcdefg", 9)   = "fgabcde"
7249
     * StringUtils.rotate("abcdefg", -9)  = "cdefgab"
7250
     * </pre>
7251
     *
7252
     * @param str  the String to rotate, may be null
7253
     * @param shift  number of time to shift (positive : right shift, negative : left shift)
7254
     * @return the rotated String,
7255
     *          or the original String if {@code shift == 0},
7256
     *          or {@code null} if null String input
7257
     * @since 3.5
7258
     */
7259
    public static String rotate(final String str, final int shift) {
7260 1 1. rotate : negated conditional → KILLED
        if (str == null) {
7261 1 1. rotate : mutated return of Object value for org/apache/commons/lang3/StringUtils::rotate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7262
        }
7263
7264
        final int strLen = str.length();
7265 4 1. rotate : Replaced integer modulus with multiplication → SURVIVED
2. rotate : negated conditional → KILLED
3. rotate : negated conditional → KILLED
4. rotate : negated conditional → KILLED
        if (shift == 0 || strLen == 0 || shift % strLen == 0) {
7266 1 1. rotate : mutated return of Object value for org/apache/commons/lang3/StringUtils::rotate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
7267
        }
7268
7269
        final StringBuilder builder = new StringBuilder(strLen);
7270 2 1. rotate : removed negation → KILLED
2. rotate : Replaced integer modulus with multiplication → KILLED
        final int offset = - (shift % strLen);
7271
        builder.append(substring(str, offset));
7272
        builder.append(substring(str, 0, offset));
7273 1 1. rotate : mutated return of Object value for org/apache/commons/lang3/StringUtils::rotate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return builder.toString();
7274
    }
7275
7276
    // Splitting
7277
    //-----------------------------------------------------------------------
7278
    /**
7279
     * <p>Splits the provided text into an array, using whitespace as the
7280
     * separator.
7281
     * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
7282
     *
7283
     * <p>The separator is not included in the returned String array.
7284
     * Adjacent separators are treated as one separator.
7285
     * For more control over the split use the StrTokenizer class.</p>
7286
     *
7287
     * <p>A {@code null} input String returns {@code null}.</p>
7288
     *
7289
     * <pre>
7290
     * StringUtils.split(null)       = null
7291
     * StringUtils.split("")         = []
7292
     * StringUtils.split("abc def")  = ["abc", "def"]
7293
     * StringUtils.split("abc  def") = ["abc", "def"]
7294
     * StringUtils.split(" abc ")    = ["abc"]
7295
     * </pre>
7296
     *
7297
     * @param str  the String to parse, may be null
7298
     * @return an array of parsed Strings, {@code null} if null String input
7299
     */
7300
    public static String[] split(final String str) {
7301 1 1. split : mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return split(str, null, -1);
7302
    }
7303
7304
    /**
7305
     * <p>Splits the provided text into an array, separator specified.
7306
     * This is an alternative to using StringTokenizer.</p>
7307
     *
7308
     * <p>The separator is not included in the returned String array.
7309
     * Adjacent separators are treated as one separator.
7310
     * For more control over the split use the StrTokenizer class.</p>
7311
     *
7312
     * <p>A {@code null} input String returns {@code null}.</p>
7313
     *
7314
     * <pre>
7315
     * StringUtils.split(null, *)         = null
7316
     * StringUtils.split("", *)           = []
7317
     * StringUtils.split("a.b.c", '.')    = ["a", "b", "c"]
7318
     * StringUtils.split("a..b.c", '.')   = ["a", "b", "c"]
7319
     * StringUtils.split("a:b:c", '.')    = ["a:b:c"]
7320
     * StringUtils.split("a b c", ' ')    = ["a", "b", "c"]
7321
     * </pre>
7322
     *
7323
     * @param str  the String to parse, may be null
7324
     * @param separatorChar  the character used as the delimiter
7325
     * @return an array of parsed Strings, {@code null} if null String input
7326
     * @since 2.0
7327
     */
7328
    public static String[] split(final String str, final char separatorChar) {
7329 1 1. split : mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, separatorChar, false);
7330
    }
7331
7332
    /**
7333
     * <p>Splits the provided text into an array, separators specified.
7334
     * This is an alternative to using StringTokenizer.</p>
7335
     *
7336
     * <p>The separator is not included in the returned String array.
7337
     * Adjacent separators are treated as one separator.
7338
     * For more control over the split use the StrTokenizer class.</p>
7339
     *
7340
     * <p>A {@code null} input String returns {@code null}.
7341
     * A {@code null} separatorChars splits on whitespace.</p>
7342
     *
7343
     * <pre>
7344
     * StringUtils.split(null, *)         = null
7345
     * StringUtils.split("", *)           = []
7346
     * StringUtils.split("abc def", null) = ["abc", "def"]
7347
     * StringUtils.split("abc def", " ")  = ["abc", "def"]
7348
     * StringUtils.split("abc  def", " ") = ["abc", "def"]
7349
     * StringUtils.split("ab:cd:ef", ":") = ["ab", "cd", "ef"]
7350
     * </pre>
7351
     *
7352
     * @param str  the String to parse, may be null
7353
     * @param separatorChars  the characters used as the delimiters,
7354
     *  {@code null} splits on whitespace
7355
     * @return an array of parsed Strings, {@code null} if null String input
7356
     */
7357
    public static String[] split(final String str, final String separatorChars) {
7358 1 1. split : mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, separatorChars, -1, false);
7359
    }
7360
7361
    /**
7362
     * <p>Splits the provided text into an array with a maximum length,
7363
     * separators specified.</p>
7364
     *
7365
     * <p>The separator is not included in the returned String array.
7366
     * Adjacent separators are treated as one separator.</p>
7367
     *
7368
     * <p>A {@code null} input String returns {@code null}.
7369
     * A {@code null} separatorChars splits on whitespace.</p>
7370
     *
7371
     * <p>If more than {@code max} delimited substrings are found, the last
7372
     * returned string includes all characters after the first {@code max - 1}
7373
     * returned strings (including separator characters).</p>
7374
     *
7375
     * <pre>
7376
     * StringUtils.split(null, *, *)            = null
7377
     * StringUtils.split("", *, *)              = []
7378
     * StringUtils.split("ab cd ef", null, 0)   = ["ab", "cd", "ef"]
7379
     * StringUtils.split("ab   cd ef", null, 0) = ["ab", "cd", "ef"]
7380
     * StringUtils.split("ab:cd:ef", ":", 0)    = ["ab", "cd", "ef"]
7381
     * StringUtils.split("ab:cd:ef", ":", 2)    = ["ab", "cd:ef"]
7382
     * </pre>
7383
     *
7384
     * @param str  the String to parse, may be null
7385
     * @param separatorChars  the characters used as the delimiters,
7386
     *  {@code null} splits on whitespace
7387
     * @param max  the maximum number of elements to include in the
7388
     *  array. A zero or negative value implies no limit
7389
     * @return an array of parsed Strings, {@code null} if null String input
7390
     */
7391
    public static String[] split(final String str, final String separatorChars, final int max) {
7392 1 1. split : mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, separatorChars, max, false);
7393
    }
7394
7395
    /**
7396
     * <p>Splits a String by Character type as returned by
7397
     * {@code java.lang.Character.getType(char)}. Groups of contiguous
7398
     * characters of the same type are returned as complete tokens.
7399
     * <pre>
7400
     * StringUtils.splitByCharacterType(null)         = null
7401
     * StringUtils.splitByCharacterType("")           = []
7402
     * StringUtils.splitByCharacterType("ab de fg")   = ["ab", " ", "de", " ", "fg"]
7403
     * StringUtils.splitByCharacterType("ab   de fg") = ["ab", "   ", "de", " ", "fg"]
7404
     * StringUtils.splitByCharacterType("ab:cd:ef")   = ["ab", ":", "cd", ":", "ef"]
7405
     * StringUtils.splitByCharacterType("number5")    = ["number", "5"]
7406
     * StringUtils.splitByCharacterType("fooBar")     = ["foo", "B", "ar"]
7407
     * StringUtils.splitByCharacterType("foo200Bar")  = ["foo", "200", "B", "ar"]
7408
     * StringUtils.splitByCharacterType("ASFRules")   = ["ASFR", "ules"]
7409
     * </pre>
7410
     * @param str the String to split, may be {@code null}
7411
     * @return an array of parsed Strings, {@code null} if null String input
7412
     * @since 2.4
7413
     */
7414
    public static String[] splitByCharacterType(final String str) {
7415 1 1. splitByCharacterType : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitByCharacterType(str, false);
7416
    }
7417
7418
    /**
7419
     * <p>Splits a String by Character type as returned by
7420
     * {@code java.lang.Character.getType(char)}. Groups of contiguous
7421
     * characters of the same type are returned as complete tokens, with the
7422
     * following exception: if {@code camelCase} is {@code true},
7423
     * the character of type {@code Character.UPPERCASE_LETTER}, if any,
7424
     * immediately preceding a token of type {@code Character.LOWERCASE_LETTER}
7425
     * will belong to the following token rather than to the preceding, if any,
7426
     * {@code Character.UPPERCASE_LETTER} token.
7427
     * @param str the String to split, may be {@code null}
7428
     * @param camelCase whether to use so-called "camel-case" for letter types
7429
     * @return an array of parsed Strings, {@code null} if null String input
7430
     * @since 2.4
7431
     */
7432
    private static String[] splitByCharacterType(final String str, final boolean camelCase) {
7433 1 1. splitByCharacterType : negated conditional → KILLED
        if (str == null) {
7434 1 1. splitByCharacterType : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7435
        }
7436 1 1. splitByCharacterType : negated conditional → KILLED
        if (str.isEmpty()) {
7437 1 1. splitByCharacterType : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ArrayUtils.EMPTY_STRING_ARRAY;
7438
        }
7439
        final char[] c = str.toCharArray();
7440
        final List<String> list = new ArrayList<>();
7441
        int tokenStart = 0;
7442
        int currentType = Character.getType(c[tokenStart]);
7443 4 1. splitByCharacterType : changed conditional boundary → KILLED
2. splitByCharacterType : Changed increment from 1 to -1 → KILLED
3. splitByCharacterType : Replaced integer addition with subtraction → KILLED
4. splitByCharacterType : negated conditional → KILLED
        for (int pos = tokenStart + 1; pos < c.length; pos++) {
7444
            final int type = Character.getType(c[pos]);
7445 1 1. splitByCharacterType : negated conditional → KILLED
            if (type == currentType) {
7446
                continue;
7447
            }
7448 3 1. splitByCharacterType : negated conditional → KILLED
2. splitByCharacterType : negated conditional → KILLED
3. splitByCharacterType : negated conditional → KILLED
            if (camelCase && type == Character.LOWERCASE_LETTER && currentType == Character.UPPERCASE_LETTER) {
7449 1 1. splitByCharacterType : Replaced integer subtraction with addition → KILLED
                final int newTokenStart = pos - 1;
7450 1 1. splitByCharacterType : negated conditional → KILLED
                if (newTokenStart != tokenStart) {
7451 1 1. splitByCharacterType : Replaced integer subtraction with addition → SURVIVED
                    list.add(new String(c, tokenStart, newTokenStart - tokenStart));
7452
                    tokenStart = newTokenStart;
7453
                }
7454
            } else {
7455 1 1. splitByCharacterType : Replaced integer subtraction with addition → KILLED
                list.add(new String(c, tokenStart, pos - tokenStart));
7456
                tokenStart = pos;
7457
            }
7458
            currentType = type;
7459
        }
7460 1 1. splitByCharacterType : Replaced integer subtraction with addition → KILLED
        list.add(new String(c, tokenStart, c.length - tokenStart));
7461 1 1. splitByCharacterType : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return list.toArray(new String[list.size()]);
7462
    }
7463
7464
    /**
7465
     * <p>Splits a String by Character type as returned by
7466
     * {@code java.lang.Character.getType(char)}. Groups of contiguous
7467
     * characters of the same type are returned as complete tokens, with the
7468
     * following exception: the character of type
7469
     * {@code Character.UPPERCASE_LETTER}, if any, immediately
7470
     * preceding a token of type {@code Character.LOWERCASE_LETTER}
7471
     * will belong to the following token rather than to the preceding, if any,
7472
     * {@code Character.UPPERCASE_LETTER} token.
7473
     * <pre>
7474
     * StringUtils.splitByCharacterTypeCamelCase(null)         = null
7475
     * StringUtils.splitByCharacterTypeCamelCase("")           = []
7476
     * StringUtils.splitByCharacterTypeCamelCase("ab de fg")   = ["ab", " ", "de", " ", "fg"]
7477
     * StringUtils.splitByCharacterTypeCamelCase("ab   de fg") = ["ab", "   ", "de", " ", "fg"]
7478
     * StringUtils.splitByCharacterTypeCamelCase("ab:cd:ef")   = ["ab", ":", "cd", ":", "ef"]
7479
     * StringUtils.splitByCharacterTypeCamelCase("number5")    = ["number", "5"]
7480
     * StringUtils.splitByCharacterTypeCamelCase("fooBar")     = ["foo", "Bar"]
7481
     * StringUtils.splitByCharacterTypeCamelCase("foo200Bar")  = ["foo", "200", "Bar"]
7482
     * StringUtils.splitByCharacterTypeCamelCase("ASFRules")   = ["ASF", "Rules"]
7483
     * </pre>
7484
     * @param str the String to split, may be {@code null}
7485
     * @return an array of parsed Strings, {@code null} if null String input
7486
     * @since 2.4
7487
     */
7488
    public static String[] splitByCharacterTypeCamelCase(final String str) {
7489 1 1. splitByCharacterTypeCamelCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterTypeCamelCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitByCharacterType(str, true);
7490
    }
7491
7492
    /**
7493
     * <p>Splits the provided text into an array, separator string specified.</p>
7494
     *
7495
     * <p>The separator(s) will not be included in the returned String array.
7496
     * Adjacent separators are treated as one separator.</p>
7497
     *
7498
     * <p>A {@code null} input String returns {@code null}.
7499
     * A {@code null} separator splits on whitespace.</p>
7500
     *
7501
     * <pre>
7502
     * StringUtils.splitByWholeSeparator(null, *)               = null
7503
     * StringUtils.splitByWholeSeparator("", *)                 = []
7504
     * StringUtils.splitByWholeSeparator("ab de fg", null)      = ["ab", "de", "fg"]
7505
     * StringUtils.splitByWholeSeparator("ab   de fg", null)    = ["ab", "de", "fg"]
7506
     * StringUtils.splitByWholeSeparator("ab:cd:ef", ":")       = ["ab", "cd", "ef"]
7507
     * StringUtils.splitByWholeSeparator("ab-!-cd-!-ef", "-!-") = ["ab", "cd", "ef"]
7508
     * </pre>
7509
     *
7510
     * @param str  the String to parse, may be null
7511
     * @param separator  String containing the String to be used as a delimiter,
7512
     *  {@code null} splits on whitespace
7513
     * @return an array of parsed Strings, {@code null} if null String was input
7514
     */
7515
    public static String[] splitByWholeSeparator(final String str, final String separator) {
7516 1 1. splitByWholeSeparator : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparator to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitByWholeSeparatorWorker(str, separator, -1, false);
7517
    }
7518
7519
    /**
7520
     * <p>Splits the provided text into an array, separator string specified.
7521
     * Returns a maximum of {@code max} substrings.</p>
7522
     *
7523
     * <p>The separator(s) will not be included in the returned String array.
7524
     * Adjacent separators are treated as one separator.</p>
7525
     *
7526
     * <p>A {@code null} input String returns {@code null}.
7527
     * A {@code null} separator splits on whitespace.</p>
7528
     *
7529
     * <pre>
7530
     * StringUtils.splitByWholeSeparator(null, *, *)               = null
7531
     * StringUtils.splitByWholeSeparator("", *, *)                 = []
7532
     * StringUtils.splitByWholeSeparator("ab de fg", null, 0)      = ["ab", "de", "fg"]
7533
     * StringUtils.splitByWholeSeparator("ab   de fg", null, 0)    = ["ab", "de", "fg"]
7534
     * StringUtils.splitByWholeSeparator("ab:cd:ef", ":", 2)       = ["ab", "cd:ef"]
7535
     * StringUtils.splitByWholeSeparator("ab-!-cd-!-ef", "-!-", 5) = ["ab", "cd", "ef"]
7536
     * StringUtils.splitByWholeSeparator("ab-!-cd-!-ef", "-!-", 2) = ["ab", "cd-!-ef"]
7537
     * </pre>
7538
     *
7539
     * @param str  the String to parse, may be null
7540
     * @param separator  String containing the String to be used as a delimiter,
7541
     *  {@code null} splits on whitespace
7542
     * @param max  the maximum number of elements to include in the returned
7543
     *  array. A zero or negative value implies no limit.
7544
     * @return an array of parsed Strings, {@code null} if null String was input
7545
     */
7546
    public static String[] splitByWholeSeparator( final String str, final String separator, final int max) {
7547 1 1. splitByWholeSeparator : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparator to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitByWholeSeparatorWorker(str, separator, max, false);
7548
    }
7549
7550
    /**
7551
     * <p>Splits the provided text into an array, separator string specified. </p>
7552
     *
7553
     * <p>The separator is not included in the returned String array.
7554
     * Adjacent separators are treated as separators for empty tokens.
7555
     * For more control over the split use the StrTokenizer class.</p>
7556
     *
7557
     * <p>A {@code null} input String returns {@code null}.
7558
     * A {@code null} separator splits on whitespace.</p>
7559
     *
7560
     * <pre>
7561
     * StringUtils.splitByWholeSeparatorPreserveAllTokens(null, *)               = null
7562
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("", *)                 = []
7563
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab de fg", null)      = ["ab", "de", "fg"]
7564
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab   de fg", null)    = ["ab", "", "", "de", "fg"]
7565
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab:cd:ef", ":")       = ["ab", "cd", "ef"]
7566
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab-!-cd-!-ef", "-!-") = ["ab", "cd", "ef"]
7567
     * </pre>
7568
     *
7569
     * @param str  the String to parse, may be null
7570
     * @param separator  String containing the String to be used as a delimiter,
7571
     *  {@code null} splits on whitespace
7572
     * @return an array of parsed Strings, {@code null} if null String was input
7573
     * @since 2.4
7574
     */
7575
    public static String[] splitByWholeSeparatorPreserveAllTokens(final String str, final String separator) {
7576 1 1. splitByWholeSeparatorPreserveAllTokens : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitByWholeSeparatorWorker(str, separator, -1, true);
7577
    }
7578
7579
    /**
7580
     * <p>Splits the provided text into an array, separator string specified.
7581
     * Returns a maximum of {@code max} substrings.</p>
7582
     *
7583
     * <p>The separator is not included in the returned String array.
7584
     * Adjacent separators are treated as separators for empty tokens.
7585
     * For more control over the split use the StrTokenizer class.</p>
7586
     *
7587
     * <p>A {@code null} input String returns {@code null}.
7588
     * A {@code null} separator splits on whitespace.</p>
7589
     *
7590
     * <pre>
7591
     * StringUtils.splitByWholeSeparatorPreserveAllTokens(null, *, *)               = null
7592
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("", *, *)                 = []
7593
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab de fg", null, 0)      = ["ab", "de", "fg"]
7594
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab   de fg", null, 0)    = ["ab", "", "", "de", "fg"]
7595
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab:cd:ef", ":", 2)       = ["ab", "cd:ef"]
7596
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab-!-cd-!-ef", "-!-", 5) = ["ab", "cd", "ef"]
7597
     * StringUtils.splitByWholeSeparatorPreserveAllTokens("ab-!-cd-!-ef", "-!-", 2) = ["ab", "cd-!-ef"]
7598
     * </pre>
7599
     *
7600
     * @param str  the String to parse, may be null
7601
     * @param separator  String containing the String to be used as a delimiter,
7602
     *  {@code null} splits on whitespace
7603
     * @param max  the maximum number of elements to include in the returned
7604
     *  array. A zero or negative value implies no limit.
7605
     * @return an array of parsed Strings, {@code null} if null String was input
7606
     * @since 2.4
7607
     */
7608
    public static String[] splitByWholeSeparatorPreserveAllTokens(final String str, final String separator, final int max) {
7609 1 1. splitByWholeSeparatorPreserveAllTokens : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitByWholeSeparatorWorker(str, separator, max, true);
7610
    }
7611
7612
    /**
7613
     * Performs the logic for the {@code splitByWholeSeparatorPreserveAllTokens} methods.
7614
     *
7615
     * @param str  the String to parse, may be {@code null}
7616
     * @param separator  String containing the String to be used as a delimiter,
7617
     *  {@code null} splits on whitespace
7618
     * @param max  the maximum number of elements to include in the returned
7619
     *  array. A zero or negative value implies no limit.
7620
     * @param preserveAllTokens if {@code true}, adjacent separators are
7621
     * treated as empty token separators; if {@code false}, adjacent
7622
     * separators are treated as one separator.
7623
     * @return an array of parsed Strings, {@code null} if null String input
7624
     * @since 2.4
7625
     */
7626
    private static String[] splitByWholeSeparatorWorker(
7627
            final String str, final String separator, final int max, final boolean preserveAllTokens) {
7628 1 1. splitByWholeSeparatorWorker : negated conditional → KILLED
        if (str == null) {
7629 1 1. splitByWholeSeparatorWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7630
        }
7631
7632
        final int len = str.length();
7633
7634 1 1. splitByWholeSeparatorWorker : negated conditional → KILLED
        if (len == 0) {
7635 1 1. splitByWholeSeparatorWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ArrayUtils.EMPTY_STRING_ARRAY;
7636
        }
7637
7638 2 1. splitByWholeSeparatorWorker : negated conditional → KILLED
2. splitByWholeSeparatorWorker : negated conditional → KILLED
        if (separator == null || EMPTY.equals(separator)) {
7639
            // Split on whitespace.
7640 1 1. splitByWholeSeparatorWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return splitWorker(str, null, max, preserveAllTokens);
7641
        }
7642
7643
        final int separatorLength = separator.length();
7644
7645
        final ArrayList<String> substrings = new ArrayList<>();
7646
        int numberOfSubstrings = 0;
7647
        int beg = 0;
7648
        int end = 0;
7649 2 1. splitByWholeSeparatorWorker : changed conditional boundary → TIMED_OUT
2. splitByWholeSeparatorWorker : negated conditional → KILLED
        while (end < len) {
7650
            end = str.indexOf(separator, beg);
7651
7652 2 1. splitByWholeSeparatorWorker : changed conditional boundary → TIMED_OUT
2. splitByWholeSeparatorWorker : negated conditional → KILLED
            if (end > -1) {
7653 2 1. splitByWholeSeparatorWorker : changed conditional boundary → KILLED
2. splitByWholeSeparatorWorker : negated conditional → KILLED
                if (end > beg) {
7654 1 1. splitByWholeSeparatorWorker : Changed increment from 1 to -1 → KILLED
                    numberOfSubstrings += 1;
7655
7656 1 1. splitByWholeSeparatorWorker : negated conditional → KILLED
                    if (numberOfSubstrings == max) {
7657
                        end = len;
7658
                        substrings.add(str.substring(beg));
7659
                    } else {
7660
                        // The following is OK, because String.substring( beg, end ) excludes
7661
                        // the character at the position 'end'.
7662
                        substrings.add(str.substring(beg, end));
7663
7664
                        // Set the starting point for the next search.
7665
                        // The following is equivalent to beg = end + (separatorLength - 1) + 1,
7666
                        // which is the right calculation:
7667 1 1. splitByWholeSeparatorWorker : Replaced integer addition with subtraction → TIMED_OUT
                        beg = end + separatorLength;
7668
                    }
7669
                } else {
7670
                    // We found a consecutive occurrence of the separator, so skip it.
7671 1 1. splitByWholeSeparatorWorker : negated conditional → KILLED
                    if (preserveAllTokens) {
7672 1 1. splitByWholeSeparatorWorker : Changed increment from 1 to -1 → KILLED
                        numberOfSubstrings += 1;
7673 1 1. splitByWholeSeparatorWorker : negated conditional → KILLED
                        if (numberOfSubstrings == max) {
7674
                            end = len;
7675
                            substrings.add(str.substring(beg));
7676
                        } else {
7677
                            substrings.add(EMPTY);
7678
                        }
7679
                    }
7680 1 1. splitByWholeSeparatorWorker : Replaced integer addition with subtraction → TIMED_OUT
                    beg = end + separatorLength;
7681
                }
7682
            } else {
7683
                // String.substring( beg ) goes from 'beg' to the end of the String.
7684
                substrings.add(str.substring(beg));
7685
                end = len;
7686
            }
7687
        }
7688
7689 1 1. splitByWholeSeparatorWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return substrings.toArray(new String[substrings.size()]);
7690
    }
7691
7692
    // -----------------------------------------------------------------------
7693
    /**
7694
     * <p>Splits the provided text into an array, using whitespace as the
7695
     * separator, preserving all tokens, including empty tokens created by
7696
     * adjacent separators. This is an alternative to using StringTokenizer.
7697
     * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
7698
     *
7699
     * <p>The separator is not included in the returned String array.
7700
     * Adjacent separators are treated as separators for empty tokens.
7701
     * For more control over the split use the StrTokenizer class.</p>
7702
     *
7703
     * <p>A {@code null} input String returns {@code null}.</p>
7704
     *
7705
     * <pre>
7706
     * StringUtils.splitPreserveAllTokens(null)       = null
7707
     * StringUtils.splitPreserveAllTokens("")         = []
7708
     * StringUtils.splitPreserveAllTokens("abc def")  = ["abc", "def"]
7709
     * StringUtils.splitPreserveAllTokens("abc  def") = ["abc", "", "def"]
7710
     * StringUtils.splitPreserveAllTokens(" abc ")    = ["", "abc", ""]
7711
     * </pre>
7712
     *
7713
     * @param str  the String to parse, may be {@code null}
7714
     * @return an array of parsed Strings, {@code null} if null String input
7715
     * @since 2.1
7716
     */
7717
    public static String[] splitPreserveAllTokens(final String str) {
7718 1 1. splitPreserveAllTokens : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, null, -1, true);
7719
    }
7720
7721
    /**
7722
     * <p>Splits the provided text into an array, separator specified,
7723
     * preserving all tokens, including empty tokens created by adjacent
7724
     * separators. This is an alternative to using StringTokenizer.</p>
7725
     *
7726
     * <p>The separator is not included in the returned String array.
7727
     * Adjacent separators are treated as separators for empty tokens.
7728
     * For more control over the split use the StrTokenizer class.</p>
7729
     *
7730
     * <p>A {@code null} input String returns {@code null}.</p>
7731
     *
7732
     * <pre>
7733
     * StringUtils.splitPreserveAllTokens(null, *)         = null
7734
     * StringUtils.splitPreserveAllTokens("", *)           = []
7735
     * StringUtils.splitPreserveAllTokens("a.b.c", '.')    = ["a", "b", "c"]
7736
     * StringUtils.splitPreserveAllTokens("a..b.c", '.')   = ["a", "", "b", "c"]
7737
     * StringUtils.splitPreserveAllTokens("a:b:c", '.')    = ["a:b:c"]
7738
     * StringUtils.splitPreserveAllTokens("a\tb\nc", null) = ["a", "b", "c"]
7739
     * StringUtils.splitPreserveAllTokens("a b c", ' ')    = ["a", "b", "c"]
7740
     * StringUtils.splitPreserveAllTokens("a b c ", ' ')   = ["a", "b", "c", ""]
7741
     * StringUtils.splitPreserveAllTokens("a b c  ", ' ')   = ["a", "b", "c", "", ""]
7742
     * StringUtils.splitPreserveAllTokens(" a b c", ' ')   = ["", a", "b", "c"]
7743
     * StringUtils.splitPreserveAllTokens("  a b c", ' ')  = ["", "", a", "b", "c"]
7744
     * StringUtils.splitPreserveAllTokens(" a b c ", ' ')  = ["", a", "b", "c", ""]
7745
     * </pre>
7746
     *
7747
     * @param str  the String to parse, may be {@code null}
7748
     * @param separatorChar  the character used as the delimiter,
7749
     *  {@code null} splits on whitespace
7750
     * @return an array of parsed Strings, {@code null} if null String input
7751
     * @since 2.1
7752
     */
7753
    public static String[] splitPreserveAllTokens(final String str, final char separatorChar) {
7754 1 1. splitPreserveAllTokens : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, separatorChar, true);
7755
    }
7756
7757
    /**
7758
     * <p>Splits the provided text into an array, separators specified,
7759
     * preserving all tokens, including empty tokens created by adjacent
7760
     * separators. This is an alternative to using StringTokenizer.</p>
7761
     *
7762
     * <p>The separator is not included in the returned String array.
7763
     * Adjacent separators are treated as separators for empty tokens.
7764
     * For more control over the split use the StrTokenizer class.</p>
7765
     *
7766
     * <p>A {@code null} input String returns {@code null}.
7767
     * A {@code null} separatorChars splits on whitespace.</p>
7768
     *
7769
     * <pre>
7770
     * StringUtils.splitPreserveAllTokens(null, *)           = null
7771
     * StringUtils.splitPreserveAllTokens("", *)             = []
7772
     * StringUtils.splitPreserveAllTokens("abc def", null)   = ["abc", "def"]
7773
     * StringUtils.splitPreserveAllTokens("abc def", " ")    = ["abc", "def"]
7774
     * StringUtils.splitPreserveAllTokens("abc  def", " ")   = ["abc", "", def"]
7775
     * StringUtils.splitPreserveAllTokens("ab:cd:ef", ":")   = ["ab", "cd", "ef"]
7776
     * StringUtils.splitPreserveAllTokens("ab:cd:ef:", ":")  = ["ab", "cd", "ef", ""]
7777
     * StringUtils.splitPreserveAllTokens("ab:cd:ef::", ":") = ["ab", "cd", "ef", "", ""]
7778
     * StringUtils.splitPreserveAllTokens("ab::cd:ef", ":")  = ["ab", "", cd", "ef"]
7779
     * StringUtils.splitPreserveAllTokens(":cd:ef", ":")     = ["", cd", "ef"]
7780
     * StringUtils.splitPreserveAllTokens("::cd:ef", ":")    = ["", "", cd", "ef"]
7781
     * StringUtils.splitPreserveAllTokens(":cd:ef:", ":")    = ["", cd", "ef", ""]
7782
     * </pre>
7783
     *
7784
     * @param str  the String to parse, may be {@code null}
7785
     * @param separatorChars  the characters used as the delimiters,
7786
     *  {@code null} splits on whitespace
7787
     * @return an array of parsed Strings, {@code null} if null String input
7788
     * @since 2.1
7789
     */
7790
    public static String[] splitPreserveAllTokens(final String str, final String separatorChars) {
7791 1 1. splitPreserveAllTokens : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, separatorChars, -1, true);
7792
    }
7793
7794
    /**
7795
     * <p>Splits the provided text into an array with a maximum length,
7796
     * separators specified, preserving all tokens, including empty tokens
7797
     * created by adjacent separators.</p>
7798
     *
7799
     * <p>The separator is not included in the returned String array.
7800
     * Adjacent separators are treated as separators for empty tokens.
7801
     * Adjacent separators are treated as one separator.</p>
7802
     *
7803
     * <p>A {@code null} input String returns {@code null}.
7804
     * A {@code null} separatorChars splits on whitespace.</p>
7805
     *
7806
     * <p>If more than {@code max} delimited substrings are found, the last
7807
     * returned string includes all characters after the first {@code max - 1}
7808
     * returned strings (including separator characters).</p>
7809
     *
7810
     * <pre>
7811
     * StringUtils.splitPreserveAllTokens(null, *, *)            = null
7812
     * StringUtils.splitPreserveAllTokens("", *, *)              = []
7813
     * StringUtils.splitPreserveAllTokens("ab de fg", null, 0)   = ["ab", "de", "fg"]
7814
     * StringUtils.splitPreserveAllTokens("ab   de fg", null, 0) = ["ab", "", "", "de", "fg"]
7815
     * StringUtils.splitPreserveAllTokens("ab:cd:ef", ":", 0)    = ["ab", "cd", "ef"]
7816
     * StringUtils.splitPreserveAllTokens("ab:cd:ef", ":", 2)    = ["ab", "cd:ef"]
7817
     * StringUtils.splitPreserveAllTokens("ab   de fg", null, 2) = ["ab", "  de fg"]
7818
     * StringUtils.splitPreserveAllTokens("ab   de fg", null, 3) = ["ab", "", " de fg"]
7819
     * StringUtils.splitPreserveAllTokens("ab   de fg", null, 4) = ["ab", "", "", "de fg"]
7820
     * </pre>
7821
     *
7822
     * @param str  the String to parse, may be {@code null}
7823
     * @param separatorChars  the characters used as the delimiters,
7824
     *  {@code null} splits on whitespace
7825
     * @param max  the maximum number of elements to include in the
7826
     *  array. A zero or negative value implies no limit
7827
     * @return an array of parsed Strings, {@code null} if null String input
7828
     * @since 2.1
7829
     */
7830
    public static String[] splitPreserveAllTokens(final String str, final String separatorChars, final int max) {
7831 1 1. splitPreserveAllTokens : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return splitWorker(str, separatorChars, max, true);
7832
    }
7833
7834
    /**
7835
     * Performs the logic for the {@code split} and
7836
     * {@code splitPreserveAllTokens} methods that do not return a
7837
     * maximum array length.
7838
     *
7839
     * @param str  the String to parse, may be {@code null}
7840
     * @param separatorChar the separate character
7841
     * @param preserveAllTokens if {@code true}, adjacent separators are
7842
     * treated as empty token separators; if {@code false}, adjacent
7843
     * separators are treated as one separator.
7844
     * @return an array of parsed Strings, {@code null} if null String input
7845
     */
7846
    private static String[] splitWorker(final String str, final char separatorChar, final boolean preserveAllTokens) {
7847
        // Performance tuned for 2.0 (JDK1.4)
7848
7849 1 1. splitWorker : negated conditional → KILLED
        if (str == null) {
7850 1 1. splitWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7851
        }
7852
        final int len = str.length();
7853 1 1. splitWorker : negated conditional → KILLED
        if (len == 0) {
7854 1 1. splitWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ArrayUtils.EMPTY_STRING_ARRAY;
7855
        }
7856
        final List<String> list = new ArrayList<>();
7857
        int i = 0, start = 0;
7858
        boolean match = false;
7859
        boolean lastMatch = false;
7860 2 1. splitWorker : changed conditional boundary → KILLED
2. splitWorker : negated conditional → KILLED
        while (i < len) {
7861 1 1. splitWorker : negated conditional → KILLED
            if (str.charAt(i) == separatorChar) {
7862 2 1. splitWorker : negated conditional → KILLED
2. splitWorker : negated conditional → KILLED
                if (match || preserveAllTokens) {
7863
                    list.add(str.substring(start, i));
7864
                    match = false;
7865
                    lastMatch = true;
7866
                }
7867 1 1. splitWorker : Changed increment from 1 to -1 → TIMED_OUT
                start = ++i;
7868
                continue;
7869
            }
7870
            lastMatch = false;
7871
            match = true;
7872 1 1. splitWorker : Changed increment from 1 to -1 → KILLED
            i++;
7873
        }
7874 3 1. splitWorker : negated conditional → KILLED
2. splitWorker : negated conditional → KILLED
3. splitWorker : negated conditional → KILLED
        if (match || preserveAllTokens && lastMatch) {
7875
            list.add(str.substring(start, i));
7876
        }
7877 1 1. splitWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return list.toArray(new String[list.size()]);
7878
    }
7879
7880
    /**
7881
     * Performs the logic for the {@code split} and
7882
     * {@code splitPreserveAllTokens} methods that return a maximum array
7883
     * length.
7884
     *
7885
     * @param str  the String to parse, may be {@code null}
7886
     * @param separatorChars the separate character
7887
     * @param max  the maximum number of elements to include in the
7888
     *  array. A zero or negative value implies no limit.
7889
     * @param preserveAllTokens if {@code true}, adjacent separators are
7890
     * treated as empty token separators; if {@code false}, adjacent
7891
     * separators are treated as one separator.
7892
     * @return an array of parsed Strings, {@code null} if null String input
7893
     */
7894
    private static String[] splitWorker(final String str, final String separatorChars, final int max, final boolean preserveAllTokens) {
7895
        // Performance tuned for 2.0 (JDK1.4)
7896
        // Direct code is quicker than StringTokenizer.
7897
        // Also, StringTokenizer uses isSpace() not isWhitespace()
7898
7899 1 1. splitWorker : negated conditional → KILLED
        if (str == null) {
7900 1 1. splitWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
7901
        }
7902
        final int len = str.length();
7903 1 1. splitWorker : negated conditional → KILLED
        if (len == 0) {
7904 1 1. splitWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ArrayUtils.EMPTY_STRING_ARRAY;
7905
        }
7906
        final List<String> list = new ArrayList<>();
7907
        int sizePlus1 = 1;
7908
        int i = 0, start = 0;
7909
        boolean match = false;
7910
        boolean lastMatch = false;
7911 1 1. splitWorker : negated conditional → KILLED
        if (separatorChars == null) {
7912
            // Null separator means use whitespace
7913 2 1. splitWorker : changed conditional boundary → KILLED
2. splitWorker : negated conditional → KILLED
            while (i < len) {
7914 1 1. splitWorker : negated conditional → KILLED
                if (Character.isWhitespace(str.charAt(i))) {
7915 2 1. splitWorker : negated conditional → KILLED
2. splitWorker : negated conditional → KILLED
                    if (match || preserveAllTokens) {
7916
                        lastMatch = true;
7917 2 1. splitWorker : Changed increment from 1 to -1 → KILLED
2. splitWorker : negated conditional → KILLED
                        if (sizePlus1++ == max) {
7918
                            i = len;
7919
                            lastMatch = false;
7920
                        }
7921
                        list.add(str.substring(start, i));
7922
                        match = false;
7923
                    }
7924 1 1. splitWorker : Changed increment from 1 to -1 → TIMED_OUT
                    start = ++i;
7925
                    continue;
7926
                }
7927
                lastMatch = false;
7928
                match = true;
7929 1 1. splitWorker : Changed increment from 1 to -1 → KILLED
                i++;
7930
            }
7931 1 1. splitWorker : negated conditional → SURVIVED
        } else if (separatorChars.length() == 1) {
7932
            // Optimise 1 character case
7933
            final char sep = separatorChars.charAt(0);
7934 2 1. splitWorker : changed conditional boundary → KILLED
2. splitWorker : negated conditional → KILLED
            while (i < len) {
7935 1 1. splitWorker : negated conditional → KILLED
                if (str.charAt(i) == sep) {
7936 2 1. splitWorker : negated conditional → KILLED
2. splitWorker : negated conditional → KILLED
                    if (match || preserveAllTokens) {
7937
                        lastMatch = true;
7938 2 1. splitWorker : Changed increment from 1 to -1 → KILLED
2. splitWorker : negated conditional → KILLED
                        if (sizePlus1++ == max) {
7939
                            i = len;
7940
                            lastMatch = false;
7941
                        }
7942
                        list.add(str.substring(start, i));
7943
                        match = false;
7944
                    }
7945 1 1. splitWorker : Changed increment from 1 to -1 → TIMED_OUT
                    start = ++i;
7946
                    continue;
7947
                }
7948
                lastMatch = false;
7949
                match = true;
7950 1 1. splitWorker : Changed increment from 1 to -1 → KILLED
                i++;
7951
            }
7952
        } else {
7953
            // standard case
7954 2 1. splitWorker : changed conditional boundary → KILLED
2. splitWorker : negated conditional → KILLED
            while (i < len) {
7955 2 1. splitWorker : changed conditional boundary → KILLED
2. splitWorker : negated conditional → KILLED
                if (separatorChars.indexOf(str.charAt(i)) >= 0) {
7956 2 1. splitWorker : negated conditional → KILLED
2. splitWorker : negated conditional → KILLED
                    if (match || preserveAllTokens) {
7957
                        lastMatch = true;
7958 2 1. splitWorker : Changed increment from 1 to -1 → KILLED
2. splitWorker : negated conditional → KILLED
                        if (sizePlus1++ == max) {
7959
                            i = len;
7960
                            lastMatch = false;
7961
                        }
7962
                        list.add(str.substring(start, i));
7963
                        match = false;
7964
                    }
7965 1 1. splitWorker : Changed increment from 1 to -1 → TIMED_OUT
                    start = ++i;
7966
                    continue;
7967
                }
7968
                lastMatch = false;
7969
                match = true;
7970 1 1. splitWorker : Changed increment from 1 to -1 → KILLED
                i++;
7971
            }
7972
        }
7973 3 1. splitWorker : negated conditional → KILLED
2. splitWorker : negated conditional → KILLED
3. splitWorker : negated conditional → KILLED
        if (match || preserveAllTokens && lastMatch) {
7974
            list.add(str.substring(start, i));
7975
        }
7976 1 1. splitWorker : mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return list.toArray(new String[list.size()]);
7977
    }
7978
7979
    /**
7980
     * <p>Check if a CharSequence starts with a specified prefix.</p>
7981
     *
7982
     * <p>{@code null}s are handled without exceptions. Two {@code null}
7983
     * references are considered to be equal. The comparison is case sensitive.</p>
7984
     *
7985
     * <pre>
7986
     * StringUtils.startsWith(null, null)      = true
7987
     * StringUtils.startsWith(null, "abc")     = false
7988
     * StringUtils.startsWith("abcdef", null)  = false
7989
     * StringUtils.startsWith("abcdef", "abc") = true
7990
     * StringUtils.startsWith("ABCDEF", "abc") = false
7991
     * </pre>
7992
     *
7993
     * @see java.lang.String#startsWith(String)
7994
     * @param str  the CharSequence to check, may be null
7995
     * @param prefix the prefix to find, may be null
7996
     * @return {@code true} if the CharSequence starts with the prefix, case sensitive, or
7997
     *  both {@code null}
7998
     * @since 2.4
7999
     * @since 3.0 Changed signature from startsWith(String, String) to startsWith(CharSequence, CharSequence)
8000
     */
8001
    public static boolean startsWith(final CharSequence str, final CharSequence prefix) {
8002 1 1. startsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return startsWith(str, prefix, false);
8003
    }
8004
8005
    /**
8006
     * <p>Check if a CharSequence starts with a specified prefix (optionally case insensitive).</p>
8007
     *
8008
     * @see java.lang.String#startsWith(String)
8009
     * @param str  the CharSequence to check, may be null
8010
     * @param prefix the prefix to find, may be null
8011
     * @param ignoreCase indicates whether the compare should ignore case
8012
     *  (case insensitive) or not.
8013
     * @return {@code true} if the CharSequence starts with the prefix or
8014
     *  both {@code null}
8015
     */
8016
    private static boolean startsWith(final CharSequence str, final CharSequence prefix, final boolean ignoreCase) {
8017 2 1. startsWith : negated conditional → KILLED
2. startsWith : negated conditional → KILLED
        if (str == null || prefix == null) {
8018 2 1. startsWith : negated conditional → KILLED
2. startsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return str == prefix;
8019
        }
8020 2 1. startsWith : changed conditional boundary → SURVIVED
2. startsWith : negated conditional → KILLED
        if (prefix.length() > str.length()) {
8021 1 1. startsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
8022
        }
8023 1 1. startsWith : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return CharSequenceUtils.regionMatches(str, ignoreCase, 0, prefix, 0, prefix.length());
8024
    }
8025
8026
    /**
8027
     * <p>Check if a CharSequence starts with any of the provided case-sensitive prefixes.</p>
8028
     *
8029
     * <pre>
8030
     * StringUtils.startsWithAny(null, null)      = false
8031
     * StringUtils.startsWithAny(null, new String[] {"abc"})  = false
8032
     * StringUtils.startsWithAny("abcxyz", null)     = false
8033
     * StringUtils.startsWithAny("abcxyz", new String[] {""}) = true
8034
     * StringUtils.startsWithAny("abcxyz", new String[] {"abc"}) = true
8035
     * StringUtils.startsWithAny("abcxyz", new String[] {null, "xyz", "abc"}) = true
8036
     * StringUtils.startsWithAny("abcxyz", null, "xyz", "ABCX") = false
8037
     * StringUtils.startsWithAny("ABCXYZ", null, "xyz", "abc") = false
8038
     * </pre>
8039
     *
8040
     * @param sequence the CharSequence to check, may be null
8041
     * @param searchStrings the case-sensitive CharSequence prefixes, may be empty or contain {@code null}
8042
     * @see StringUtils#startsWith(CharSequence, CharSequence)
8043
     * @return {@code true} if the input {@code sequence} is {@code null} AND no {@code searchStrings} are provided, or
8044
     *   the input {@code sequence} begins with any of the provided case-sensitive {@code searchStrings}.
8045
     * @since 2.5
8046
     * @since 3.0 Changed signature from startsWithAny(String, String[]) to startsWithAny(CharSequence, CharSequence...)
8047
     */
8048
    public static boolean startsWithAny(final CharSequence sequence, final CharSequence... searchStrings) {
8049 2 1. startsWithAny : negated conditional → KILLED
2. startsWithAny : negated conditional → KILLED
        if (isEmpty(sequence) || ArrayUtils.isEmpty(searchStrings)) {
8050 1 1. startsWithAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
            return false;
8051
        }
8052
        for (final CharSequence searchString : searchStrings) {
8053 1 1. startsWithAny : negated conditional → KILLED
            if (startsWith(sequence, searchString)) {
8054 1 1. startsWithAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
                return true;
8055
            }
8056
        }
8057 1 1. startsWithAny : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return false;
8058
    }
8059
8060
    /**
8061
     * <p>Case insensitive check if a CharSequence starts with a specified prefix.</p>
8062
     *
8063
     * <p>{@code null}s are handled without exceptions. Two {@code null}
8064
     * references are considered to be equal. The comparison is case insensitive.</p>
8065
     *
8066
     * <pre>
8067
     * StringUtils.startsWithIgnoreCase(null, null)      = true
8068
     * StringUtils.startsWithIgnoreCase(null, "abc")     = false
8069
     * StringUtils.startsWithIgnoreCase("abcdef", null)  = false
8070
     * StringUtils.startsWithIgnoreCase("abcdef", "abc") = true
8071
     * StringUtils.startsWithIgnoreCase("ABCDEF", "abc") = true
8072
     * </pre>
8073
     *
8074
     * @see java.lang.String#startsWith(String)
8075
     * @param str  the CharSequence to check, may be null
8076
     * @param prefix the prefix to find, may be null
8077
     * @return {@code true} if the CharSequence starts with the prefix, case insensitive, or
8078
     *  both {@code null}
8079
     * @since 2.4
8080
     * @since 3.0 Changed signature from startsWithIgnoreCase(String, String) to startsWithIgnoreCase(CharSequence, CharSequence)
8081
     */
8082
    public static boolean startsWithIgnoreCase(final CharSequence str, final CharSequence prefix) {
8083 1 1. startsWithIgnoreCase : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED
        return startsWith(str, prefix, true);
8084
    }
8085
8086
    // Stripping
8087
    //-----------------------------------------------------------------------
8088
    /**
8089
     * <p>Strips whitespace from the start and end of a String.</p>
8090
     *
8091
     * <p>This is similar to {@link #trim(String)} but removes whitespace.
8092
     * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
8093
     *
8094
     * <p>A {@code null} input String returns {@code null}.</p>
8095
     *
8096
     * <pre>
8097
     * StringUtils.strip(null)     = null
8098
     * StringUtils.strip("")       = ""
8099
     * StringUtils.strip("   ")    = ""
8100
     * StringUtils.strip("abc")    = "abc"
8101
     * StringUtils.strip("  abc")  = "abc"
8102
     * StringUtils.strip("abc  ")  = "abc"
8103
     * StringUtils.strip(" abc ")  = "abc"
8104
     * StringUtils.strip(" ab c ") = "ab c"
8105
     * </pre>
8106
     *
8107
     * @param str  the String to remove whitespace from, may be null
8108
     * @return the stripped String, {@code null} if null String input
8109
     */
8110
    public static String strip(final String str) {
8111 1 1. strip : mutated return of Object value for org/apache/commons/lang3/StringUtils::strip to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return strip(str, null);
8112
    }
8113
8114
    /**
8115
     * <p>Strips any of a set of characters from the start and end of a String.
8116
     * This is similar to {@link String#trim()} but allows the characters
8117
     * to be stripped to be controlled.</p>
8118
     *
8119
     * <p>A {@code null} input String returns {@code null}.
8120
     * An empty string ("") input returns the empty string.</p>
8121
     *
8122
     * <p>If the stripChars String is {@code null}, whitespace is
8123
     * stripped as defined by {@link Character#isWhitespace(char)}.
8124
     * Alternatively use {@link #strip(String)}.</p>
8125
     *
8126
     * <pre>
8127
     * StringUtils.strip(null, *)          = null
8128
     * StringUtils.strip("", *)            = ""
8129
     * StringUtils.strip("abc", null)      = "abc"
8130
     * StringUtils.strip("  abc", null)    = "abc"
8131
     * StringUtils.strip("abc  ", null)    = "abc"
8132
     * StringUtils.strip(" abc ", null)    = "abc"
8133
     * StringUtils.strip("  abcyx", "xyz") = "  abc"
8134
     * </pre>
8135
     *
8136
     * @param str  the String to remove characters from, may be null
8137
     * @param stripChars  the characters to remove, null treated as whitespace
8138
     * @return the stripped String, {@code null} if null String input
8139
     */
8140
    public static String strip(String str, final String stripChars) {
8141 1 1. strip : negated conditional → KILLED
        if (isEmpty(str)) {
8142 1 1. strip : mutated return of Object value for org/apache/commons/lang3/StringUtils::strip to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8143
        }
8144
        str = stripStart(str, stripChars);
8145 1 1. strip : mutated return of Object value for org/apache/commons/lang3/StringUtils::strip to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return stripEnd(str, stripChars);
8146
    }
8147
8148
    /**
8149
     * <p>Removes diacritics (~= accents) from a string. The case will not be altered.</p>
8150
     * <p>For instance, '&agrave;' will be replaced by 'a'.</p>
8151
     * <p>Note that ligatures will be left as is.</p>
8152
     *
8153
     * <pre>
8154
     * StringUtils.stripAccents(null)                = null
8155
     * StringUtils.stripAccents("")                  = ""
8156
     * StringUtils.stripAccents("control")           = "control"
8157
     * StringUtils.stripAccents("&eacute;clair")     = "eclair"
8158
     * </pre>
8159
     *
8160
     * @param input String to be stripped
8161
     * @return input text with diacritics removed
8162
     *
8163
     * @since 3.0
8164
     */
8165
    // See also Lucene's ASCIIFoldingFilter (Lucene 2.9) that replaces accented characters by their unaccented equivalent (and uncommitted bug fix: https://issues.apache.org/jira/browse/LUCENE-1343?focusedCommentId=12858907&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12858907).
8166
    public static String stripAccents(final String input) {
8167 1 1. stripAccents : negated conditional → KILLED
        if (input == null) {
8168 1 1. stripAccents : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAccents to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8169
        }
8170
        final Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); //$NON-NLS-1$
8171
        final StringBuilder decomposed = new StringBuilder(Normalizer.normalize(input, Normalizer.Form.NFD));
8172 1 1. stripAccents : removed call to org/apache/commons/lang3/StringUtils::convertRemainingAccentCharacters → KILLED
        convertRemainingAccentCharacters(decomposed);
8173
        // Note that this doesn't correctly remove ligatures...
8174 1 1. stripAccents : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAccents to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return pattern.matcher(decomposed).replaceAll(EMPTY);
8175
    }
8176
8177
    // StripAll
8178
    //-----------------------------------------------------------------------
8179
    /**
8180
     * <p>Strips whitespace from the start and end of every String in an array.
8181
     * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
8182
     *
8183
     * <p>A new array is returned each time, except for length zero.
8184
     * A {@code null} array will return {@code null}.
8185
     * An empty array will return itself.
8186
     * A {@code null} array entry will be ignored.</p>
8187
     *
8188
     * <pre>
8189
     * StringUtils.stripAll(null)             = null
8190
     * StringUtils.stripAll([])               = []
8191
     * StringUtils.stripAll(["abc", "  abc"]) = ["abc", "abc"]
8192
     * StringUtils.stripAll(["abc  ", null])  = ["abc", null]
8193
     * </pre>
8194
     *
8195
     * @param strs  the array to remove whitespace from, may be null
8196
     * @return the stripped Strings, {@code null} if null array input
8197
     */
8198
    public static String[] stripAll(final String... strs) {
8199 1 1. stripAll : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAll to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return stripAll(strs, null);
8200
    }
8201
8202
    /**
8203
     * <p>Strips any of a set of characters from the start and end of every
8204
     * String in an array.</p>
8205
     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
8206
     *
8207
     * <p>A new array is returned each time, except for length zero.
8208
     * A {@code null} array will return {@code null}.
8209
     * An empty array will return itself.
8210
     * A {@code null} array entry will be ignored.
8211
     * A {@code null} stripChars will strip whitespace as defined by
8212
     * {@link Character#isWhitespace(char)}.</p>
8213
     *
8214
     * <pre>
8215
     * StringUtils.stripAll(null, *)                = null
8216
     * StringUtils.stripAll([], *)                  = []
8217
     * StringUtils.stripAll(["abc", "  abc"], null) = ["abc", "abc"]
8218
     * StringUtils.stripAll(["abc  ", null], null)  = ["abc", null]
8219
     * StringUtils.stripAll(["abc  ", null], "yz")  = ["abc  ", null]
8220
     * StringUtils.stripAll(["yabcz", null], "yz")  = ["abc", null]
8221
     * </pre>
8222
     *
8223
     * @param strs  the array to remove characters from, may be null
8224
     * @param stripChars  the characters to remove, null treated as whitespace
8225
     * @return the stripped Strings, {@code null} if null array input
8226
     */
8227
    public static String[] stripAll(final String[] strs, final String stripChars) {
8228
        int strsLen;
8229 2 1. stripAll : negated conditional → KILLED
2. stripAll : negated conditional → KILLED
        if (strs == null || (strsLen = strs.length) == 0) {
8230 1 1. stripAll : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAll to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return strs;
8231
        }
8232
        final String[] newArr = new String[strsLen];
8233 3 1. stripAll : changed conditional boundary → KILLED
2. stripAll : Changed increment from 1 to -1 → KILLED
3. stripAll : negated conditional → KILLED
        for (int i = 0; i < strsLen; i++) {
8234
            newArr[i] = strip(strs[i], stripChars);
8235
        }
8236 1 1. stripAll : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAll to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return newArr;
8237
    }
8238
8239
    /**
8240
     * <p>Strips any of a set of characters from the end of a String.</p>
8241
     *
8242
     * <p>A {@code null} input String returns {@code null}.
8243
     * An empty string ("") input returns the empty string.</p>
8244
     *
8245
     * <p>If the stripChars String is {@code null}, whitespace is
8246
     * stripped as defined by {@link Character#isWhitespace(char)}.</p>
8247
     *
8248
     * <pre>
8249
     * StringUtils.stripEnd(null, *)          = null
8250
     * StringUtils.stripEnd("", *)            = ""
8251
     * StringUtils.stripEnd("abc", "")        = "abc"
8252
     * StringUtils.stripEnd("abc", null)      = "abc"
8253
     * StringUtils.stripEnd("  abc", null)    = "  abc"
8254
     * StringUtils.stripEnd("abc  ", null)    = "abc"
8255
     * StringUtils.stripEnd(" abc ", null)    = " abc"
8256
     * StringUtils.stripEnd("  abcyx", "xyz") = "  abc"
8257
     * StringUtils.stripEnd("120.00", ".0")   = "12"
8258
     * </pre>
8259
     *
8260
     * @param str  the String to remove characters from, may be null
8261
     * @param stripChars  the set of characters to remove, null treated as whitespace
8262
     * @return the stripped String, {@code null} if null String input
8263
     */
8264
    public static String stripEnd(final String str, final String stripChars) {
8265
        int end;
8266 2 1. stripEnd : negated conditional → KILLED
2. stripEnd : negated conditional → KILLED
        if (str == null || (end = str.length()) == 0) {
8267 1 1. stripEnd : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8268
        }
8269
8270 1 1. stripEnd : negated conditional → KILLED
        if (stripChars == null) {
8271 3 1. stripEnd : Replaced integer subtraction with addition → KILLED
2. stripEnd : negated conditional → KILLED
3. stripEnd : negated conditional → KILLED
            while (end != 0 && Character.isWhitespace(str.charAt(end - 1))) {
8272 1 1. stripEnd : Changed increment from -1 to 1 → KILLED
                end--;
8273
            }
8274 1 1. stripEnd : negated conditional → KILLED
        } else if (stripChars.isEmpty()) {
8275 1 1. stripEnd : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8276
        } else {
8277 3 1. stripEnd : Replaced integer subtraction with addition → KILLED
2. stripEnd : negated conditional → KILLED
3. stripEnd : negated conditional → KILLED
            while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) {
8278 1 1. stripEnd : Changed increment from -1 to 1 → KILLED
                end--;
8279
            }
8280
        }
8281 1 1. stripEnd : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, end);
8282
    }
8283
8284
    /**
8285
     * <p>Strips any of a set of characters from the start of a String.</p>
8286
     *
8287
     * <p>A {@code null} input String returns {@code null}.
8288
     * An empty string ("") input returns the empty string.</p>
8289
     *
8290
     * <p>If the stripChars String is {@code null}, whitespace is
8291
     * stripped as defined by {@link Character#isWhitespace(char)}.</p>
8292
     *
8293
     * <pre>
8294
     * StringUtils.stripStart(null, *)          = null
8295
     * StringUtils.stripStart("", *)            = ""
8296
     * StringUtils.stripStart("abc", "")        = "abc"
8297
     * StringUtils.stripStart("abc", null)      = "abc"
8298
     * StringUtils.stripStart("  abc", null)    = "abc"
8299
     * StringUtils.stripStart("abc  ", null)    = "abc  "
8300
     * StringUtils.stripStart(" abc ", null)    = "abc "
8301
     * StringUtils.stripStart("yxabc  ", "xyz") = "abc  "
8302
     * </pre>
8303
     *
8304
     * @param str  the String to remove characters from, may be null
8305
     * @param stripChars  the characters to remove, null treated as whitespace
8306
     * @return the stripped String, {@code null} if null String input
8307
     */
8308
    public static String stripStart(final String str, final String stripChars) {
8309
        int strLen;
8310 2 1. stripStart : negated conditional → KILLED
2. stripStart : negated conditional → KILLED
        if (str == null || (strLen = str.length()) == 0) {
8311 1 1. stripStart : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripStart to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8312
        }
8313
        int start = 0;
8314 1 1. stripStart : negated conditional → KILLED
        if (stripChars == null) {
8315 2 1. stripStart : negated conditional → KILLED
2. stripStart : negated conditional → KILLED
            while (start != strLen && Character.isWhitespace(str.charAt(start))) {
8316 1 1. stripStart : Changed increment from 1 to -1 → KILLED
                start++;
8317
            }
8318 1 1. stripStart : negated conditional → KILLED
        } else if (stripChars.isEmpty()) {
8319 1 1. stripStart : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripStart to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8320
        } else {
8321 2 1. stripStart : negated conditional → KILLED
2. stripStart : negated conditional → KILLED
            while (start != strLen && stripChars.indexOf(str.charAt(start)) != INDEX_NOT_FOUND) {
8322 1 1. stripStart : Changed increment from 1 to -1 → KILLED
                start++;
8323
            }
8324
        }
8325 1 1. stripStart : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripStart to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(start);
8326
    }
8327
8328
    /**
8329
     * <p>Strips whitespace from the start and end of a String  returning
8330
     * an empty String if {@code null} input.</p>
8331
     *
8332
     * <p>This is similar to {@link #trimToEmpty(String)} but removes whitespace.
8333
     * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
8334
     *
8335
     * <pre>
8336
     * StringUtils.stripToEmpty(null)     = ""
8337
     * StringUtils.stripToEmpty("")       = ""
8338
     * StringUtils.stripToEmpty("   ")    = ""
8339
     * StringUtils.stripToEmpty("abc")    = "abc"
8340
     * StringUtils.stripToEmpty("  abc")  = "abc"
8341
     * StringUtils.stripToEmpty("abc  ")  = "abc"
8342
     * StringUtils.stripToEmpty(" abc ")  = "abc"
8343
     * StringUtils.stripToEmpty(" ab c ") = "ab c"
8344
     * </pre>
8345
     *
8346
     * @param str  the String to be stripped, may be null
8347
     * @return the trimmed String, or an empty String if {@code null} input
8348
     * @since 2.0
8349
     */
8350
    public static String stripToEmpty(final String str) {
8351 2 1. stripToEmpty : negated conditional → KILLED
2. stripToEmpty : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripToEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str == null ? EMPTY : strip(str, null);
8352
    }
8353
8354
    /**
8355
     * <p>Strips whitespace from the start and end of a String  returning
8356
     * {@code null} if the String is empty ("") after the strip.</p>
8357
     *
8358
     * <p>This is similar to {@link #trimToNull(String)} but removes whitespace.
8359
     * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
8360
     *
8361
     * <pre>
8362
     * StringUtils.stripToNull(null)     = null
8363
     * StringUtils.stripToNull("")       = null
8364
     * StringUtils.stripToNull("   ")    = null
8365
     * StringUtils.stripToNull("abc")    = "abc"
8366
     * StringUtils.stripToNull("  abc")  = "abc"
8367
     * StringUtils.stripToNull("abc  ")  = "abc"
8368
     * StringUtils.stripToNull(" abc ")  = "abc"
8369
     * StringUtils.stripToNull(" ab c ") = "ab c"
8370
     * </pre>
8371
     *
8372
     * @param str  the String to be stripped, may be null
8373
     * @return the stripped String,
8374
     *  {@code null} if whitespace, empty or null String input
8375
     * @since 2.0
8376
     */
8377
    public static String stripToNull(String str) {
8378 1 1. stripToNull : negated conditional → KILLED
        if (str == null) {
8379 1 1. stripToNull : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripToNull to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8380
        }
8381
        str = strip(str, null);
8382 2 1. stripToNull : negated conditional → KILLED
2. stripToNull : mutated return of Object value for org/apache/commons/lang3/StringUtils::stripToNull to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.isEmpty() ? null : str;
8383
    }
8384
8385
    // Substring
8386
    //-----------------------------------------------------------------------
8387
    /**
8388
     * <p>Gets a substring from the specified String avoiding exceptions.</p>
8389
     *
8390
     * <p>A negative start position can be used to start {@code n}
8391
     * characters from the end of the String.</p>
8392
     *
8393
     * <p>A {@code null} String will return {@code null}.
8394
     * An empty ("") String will return "".</p>
8395
     *
8396
     * <pre>
8397
     * StringUtils.substring(null, *)   = null
8398
     * StringUtils.substring("", *)     = ""
8399
     * StringUtils.substring("abc", 0)  = "abc"
8400
     * StringUtils.substring("abc", 2)  = "c"
8401
     * StringUtils.substring("abc", 4)  = ""
8402
     * StringUtils.substring("abc", -2) = "bc"
8403
     * StringUtils.substring("abc", -4) = "abc"
8404
     * </pre>
8405
     *
8406
     * @param str  the String to get the substring from, may be null
8407
     * @param start  the position to start from, negative means
8408
     *  count back from the end of the String by this many characters
8409
     * @return substring from start position, {@code null} if null String input
8410
     */
8411
    public static String substring(final String str, int start) {
8412 1 1. substring : negated conditional → KILLED
        if (str == null) {
8413 1 1. substring : mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8414
        }
8415
8416
        // handle negatives, which means last n characters
8417 2 1. substring : changed conditional boundary → KILLED
2. substring : negated conditional → KILLED
        if (start < 0) {
8418 1 1. substring : Replaced integer addition with subtraction → KILLED
            start = str.length() + start; // remember start is negative
8419
        }
8420
8421 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (start < 0) {
8422
            start = 0;
8423
        }
8424 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (start > str.length()) {
8425 1 1. substring : mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8426
        }
8427
8428 1 1. substring : mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(start);
8429
    }
8430
8431
    /**
8432
     * <p>Gets a substring from the specified String avoiding exceptions.</p>
8433
     *
8434
     * <p>A negative start position can be used to start/end {@code n}
8435
     * characters from the end of the String.</p>
8436
     *
8437
     * <p>The returned substring starts with the character in the {@code start}
8438
     * position and ends before the {@code end} position. All position counting is
8439
     * zero-based -- i.e., to start at the beginning of the string use
8440
     * {@code start = 0}. Negative start and end positions can be used to
8441
     * specify offsets relative to the end of the String.</p>
8442
     *
8443
     * <p>If {@code start} is not strictly to the left of {@code end}, ""
8444
     * is returned.</p>
8445
     *
8446
     * <pre>
8447
     * StringUtils.substring(null, *, *)    = null
8448
     * StringUtils.substring("", * ,  *)    = "";
8449
     * StringUtils.substring("abc", 0, 2)   = "ab"
8450
     * StringUtils.substring("abc", 2, 0)   = ""
8451
     * StringUtils.substring("abc", 2, 4)   = "c"
8452
     * StringUtils.substring("abc", 4, 6)   = ""
8453
     * StringUtils.substring("abc", 2, 2)   = ""
8454
     * StringUtils.substring("abc", -2, -1) = "b"
8455
     * StringUtils.substring("abc", -4, 2)  = "ab"
8456
     * </pre>
8457
     *
8458
     * @param str  the String to get the substring from, may be null
8459
     * @param start  the position to start from, negative means
8460
     *  count back from the end of the String by this many characters
8461
     * @param end  the position to end at (exclusive), negative means
8462
     *  count back from the end of the String by this many characters
8463
     * @return substring from start position to end position,
8464
     *  {@code null} if null String input
8465
     */
8466
    public static String substring(final String str, int start, int end) {
8467 1 1. substring : negated conditional → KILLED
        if (str == null) {
8468 1 1. substring : mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8469
        }
8470
8471
        // handle negatives
8472 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (end < 0) {
8473 1 1. substring : Replaced integer addition with subtraction → KILLED
            end = str.length() + end; // remember end is negative
8474
        }
8475 2 1. substring : changed conditional boundary → KILLED
2. substring : negated conditional → KILLED
        if (start < 0) {
8476 1 1. substring : Replaced integer addition with subtraction → KILLED
            start = str.length() + start; // remember start is negative
8477
        }
8478
8479
        // check length next
8480 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (end > str.length()) {
8481
            end = str.length();
8482
        }
8483
8484
        // if start is greater than end, return ""
8485 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (start > end) {
8486 1 1. substring : mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8487
        }
8488
8489 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (start < 0) {
8490
            start = 0;
8491
        }
8492 2 1. substring : changed conditional boundary → SURVIVED
2. substring : negated conditional → KILLED
        if (end < 0) {
8493
            end = 0;
8494
        }
8495
8496 1 1. substring : mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(start, end);
8497
    }
8498
8499
    /**
8500
     * <p>Gets the substring after the first occurrence of a separator.
8501
     * The separator is not returned.</p>
8502
     *
8503
     * <p>A {@code null} string input will return {@code null}.
8504
     * An empty ("") string input will return the empty string.
8505
     * A {@code null} separator will return the empty string if the
8506
     * input string is not {@code null}.</p>
8507
     *
8508
     * <p>If nothing is found, the empty string is returned.</p>
8509
     *
8510
     * <pre>
8511
     * StringUtils.substringAfter(null, *)      = null
8512
     * StringUtils.substringAfter("", *)        = ""
8513
     * StringUtils.substringAfter(*, null)      = ""
8514
     * StringUtils.substringAfter("abc", "a")   = "bc"
8515
     * StringUtils.substringAfter("abcba", "b") = "cba"
8516
     * StringUtils.substringAfter("abc", "c")   = ""
8517
     * StringUtils.substringAfter("abc", "d")   = ""
8518
     * StringUtils.substringAfter("abc", "")    = "abc"
8519
     * </pre>
8520
     *
8521
     * @param str  the String to get a substring from, may be null
8522
     * @param separator  the String to search for, may be null
8523
     * @return the substring after the first occurrence of the separator,
8524
     *  {@code null} if null String input
8525
     * @since 2.0
8526
     */
8527
    public static String substringAfter(final String str, final String separator) {
8528 1 1. substringAfter : negated conditional → KILLED
        if (isEmpty(str)) {
8529 1 1. substringAfter : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8530
        }
8531 1 1. substringAfter : negated conditional → KILLED
        if (separator == null) {
8532 1 1. substringAfter : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8533
        }
8534
        final int pos = str.indexOf(separator);
8535 1 1. substringAfter : negated conditional → KILLED
        if (pos == INDEX_NOT_FOUND) {
8536 1 1. substringAfter : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8537
        }
8538 2 1. substringAfter : Replaced integer addition with subtraction → KILLED
2. substringAfter : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(pos + separator.length());
8539
    }
8540
8541
    /**
8542
     * <p>Gets the substring after the last occurrence of a separator.
8543
     * The separator is not returned.</p>
8544
     *
8545
     * <p>A {@code null} string input will return {@code null}.
8546
     * An empty ("") string input will return the empty string.
8547
     * An empty or {@code null} separator will return the empty string if
8548
     * the input string is not {@code null}.</p>
8549
     *
8550
     * <p>If nothing is found, the empty string is returned.</p>
8551
     *
8552
     * <pre>
8553
     * StringUtils.substringAfterLast(null, *)      = null
8554
     * StringUtils.substringAfterLast("", *)        = ""
8555
     * StringUtils.substringAfterLast(*, "")        = ""
8556
     * StringUtils.substringAfterLast(*, null)      = ""
8557
     * StringUtils.substringAfterLast("abc", "a")   = "bc"
8558
     * StringUtils.substringAfterLast("abcba", "b") = "a"
8559
     * StringUtils.substringAfterLast("abc", "c")   = ""
8560
     * StringUtils.substringAfterLast("a", "a")     = ""
8561
     * StringUtils.substringAfterLast("a", "z")     = ""
8562
     * </pre>
8563
     *
8564
     * @param str  the String to get a substring from, may be null
8565
     * @param separator  the String to search for, may be null
8566
     * @return the substring after the last occurrence of the separator,
8567
     *  {@code null} if null String input
8568
     * @since 2.0
8569
     */
8570
    public static String substringAfterLast(final String str, final String separator) {
8571 1 1. substringAfterLast : negated conditional → KILLED
        if (isEmpty(str)) {
8572 1 1. substringAfterLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8573
        }
8574 1 1. substringAfterLast : negated conditional → KILLED
        if (isEmpty(separator)) {
8575 1 1. substringAfterLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8576
        }
8577
        final int pos = str.lastIndexOf(separator);
8578 3 1. substringAfterLast : Replaced integer subtraction with addition → SURVIVED
2. substringAfterLast : negated conditional → KILLED
3. substringAfterLast : negated conditional → KILLED
        if (pos == INDEX_NOT_FOUND || pos == str.length() - separator.length()) {
8579 1 1. substringAfterLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8580
        }
8581 2 1. substringAfterLast : Replaced integer addition with subtraction → KILLED
2. substringAfterLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(pos + separator.length());
8582
    }
8583
8584
    // startsWith
8585
    //-----------------------------------------------------------------------
8586
8587
    // SubStringAfter/SubStringBefore
8588
    //-----------------------------------------------------------------------
8589
    /**
8590
     * <p>Gets the substring before the first occurrence of a separator.
8591
     * The separator is not returned.</p>
8592
     *
8593
     * <p>A {@code null} string input will return {@code null}.
8594
     * An empty ("") string input will return the empty string.
8595
     * A {@code null} separator will return the input string.</p>
8596
     *
8597
     * <p>If nothing is found, the string input is returned.</p>
8598
     *
8599
     * <pre>
8600
     * StringUtils.substringBefore(null, *)      = null
8601
     * StringUtils.substringBefore("", *)        = ""
8602
     * StringUtils.substringBefore("abc", "a")   = ""
8603
     * StringUtils.substringBefore("abcba", "b") = "a"
8604
     * StringUtils.substringBefore("abc", "c")   = "ab"
8605
     * StringUtils.substringBefore("abc", "d")   = "abc"
8606
     * StringUtils.substringBefore("abc", "")    = ""
8607
     * StringUtils.substringBefore("abc", null)  = "abc"
8608
     * </pre>
8609
     *
8610
     * @param str  the String to get a substring from, may be null
8611
     * @param separator  the String to search for, may be null
8612
     * @return the substring before the first occurrence of the separator,
8613
     *  {@code null} if null String input
8614
     * @since 2.0
8615
     */
8616
    public static String substringBefore(final String str, final String separator) {
8617 2 1. substringBefore : negated conditional → KILLED
2. substringBefore : negated conditional → KILLED
        if (isEmpty(str) || separator == null) {
8618 1 1. substringBefore : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8619
        }
8620 1 1. substringBefore : negated conditional → KILLED
        if (separator.isEmpty()) {
8621 1 1. substringBefore : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
8622
        }
8623
        final int pos = str.indexOf(separator);
8624 1 1. substringBefore : negated conditional → KILLED
        if (pos == INDEX_NOT_FOUND) {
8625 1 1. substringBefore : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8626
        }
8627 1 1. substringBefore : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, pos);
8628
    }
8629
8630
    /**
8631
     * <p>Gets the substring before the last occurrence of a separator.
8632
     * The separator is not returned.</p>
8633
     *
8634
     * <p>A {@code null} string input will return {@code null}.
8635
     * An empty ("") string input will return the empty string.
8636
     * An empty or {@code null} separator will return the input string.</p>
8637
     *
8638
     * <p>If nothing is found, the string input is returned.</p>
8639
     *
8640
     * <pre>
8641
     * StringUtils.substringBeforeLast(null, *)      = null
8642
     * StringUtils.substringBeforeLast("", *)        = ""
8643
     * StringUtils.substringBeforeLast("abcba", "b") = "abc"
8644
     * StringUtils.substringBeforeLast("abc", "c")   = "ab"
8645
     * StringUtils.substringBeforeLast("a", "a")     = ""
8646
     * StringUtils.substringBeforeLast("a", "z")     = "a"
8647
     * StringUtils.substringBeforeLast("a", null)    = "a"
8648
     * StringUtils.substringBeforeLast("a", "")      = "a"
8649
     * </pre>
8650
     *
8651
     * @param str  the String to get a substring from, may be null
8652
     * @param separator  the String to search for, may be null
8653
     * @return the substring before the last occurrence of the separator,
8654
     *  {@code null} if null String input
8655
     * @since 2.0
8656
     */
8657
    public static String substringBeforeLast(final String str, final String separator) {
8658 2 1. substringBeforeLast : negated conditional → KILLED
2. substringBeforeLast : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(separator)) {
8659 1 1. substringBeforeLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBeforeLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8660
        }
8661
        final int pos = str.lastIndexOf(separator);
8662 1 1. substringBeforeLast : negated conditional → KILLED
        if (pos == INDEX_NOT_FOUND) {
8663 1 1. substringBeforeLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBeforeLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8664
        }
8665 1 1. substringBeforeLast : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBeforeLast to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(0, pos);
8666
    }
8667
8668
    // Substring between
8669
    //-----------------------------------------------------------------------
8670
    /**
8671
     * <p>Gets the String that is nested in between two instances of the
8672
     * same String.</p>
8673
     *
8674
     * <p>A {@code null} input String returns {@code null}.
8675
     * A {@code null} tag returns {@code null}.</p>
8676
     *
8677
     * <pre>
8678
     * StringUtils.substringBetween(null, *)            = null
8679
     * StringUtils.substringBetween("", "")             = ""
8680
     * StringUtils.substringBetween("", "tag")          = null
8681
     * StringUtils.substringBetween("tagabctag", null)  = null
8682
     * StringUtils.substringBetween("tagabctag", "")    = ""
8683
     * StringUtils.substringBetween("tagabctag", "tag") = "abc"
8684
     * </pre>
8685
     *
8686
     * @param str  the String containing the substring, may be null
8687
     * @param tag  the String before and after the substring, may be null
8688
     * @return the substring, {@code null} if no match
8689
     * @since 2.0
8690
     */
8691
    public static String substringBetween(final String str, final String tag) {
8692 1 1. substringBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return substringBetween(str, tag, tag);
8693
    }
8694
8695
    /**
8696
     * <p>Gets the String that is nested in between two Strings.
8697
     * Only the first match is returned.</p>
8698
     *
8699
     * <p>A {@code null} input String returns {@code null}.
8700
     * A {@code null} open/close returns {@code null} (no match).
8701
     * An empty ("") open and close returns an empty string.</p>
8702
     *
8703
     * <pre>
8704
     * StringUtils.substringBetween("wx[b]yz", "[", "]") = "b"
8705
     * StringUtils.substringBetween(null, *, *)          = null
8706
     * StringUtils.substringBetween(*, null, *)          = null
8707
     * StringUtils.substringBetween(*, *, null)          = null
8708
     * StringUtils.substringBetween("", "", "")          = ""
8709
     * StringUtils.substringBetween("", "", "]")         = null
8710
     * StringUtils.substringBetween("", "[", "]")        = null
8711
     * StringUtils.substringBetween("yabcz", "", "")     = ""
8712
     * StringUtils.substringBetween("yabcz", "y", "z")   = "abc"
8713
     * StringUtils.substringBetween("yabczyabcz", "y", "z")   = "abc"
8714
     * </pre>
8715
     *
8716
     * @param str  the String containing the substring, may be null
8717
     * @param open  the String before the substring, may be null
8718
     * @param close  the String after the substring, may be null
8719
     * @return the substring, {@code null} if no match
8720
     * @since 2.0
8721
     */
8722
    public static String substringBetween(final String str, final String open, final String close) {
8723 3 1. substringBetween : negated conditional → KILLED
2. substringBetween : negated conditional → KILLED
3. substringBetween : negated conditional → KILLED
        if (str == null || open == null || close == null) {
8724 1 1. substringBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8725
        }
8726
        final int start = str.indexOf(open);
8727 1 1. substringBetween : negated conditional → KILLED
        if (start != INDEX_NOT_FOUND) {
8728 1 1. substringBetween : Replaced integer addition with subtraction → KILLED
            final int end = str.indexOf(close, start + open.length());
8729 1 1. substringBetween : negated conditional → KILLED
            if (end != INDEX_NOT_FOUND) {
8730 2 1. substringBetween : Replaced integer addition with subtraction → KILLED
2. substringBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return str.substring(start + open.length(), end);
8731
            }
8732
        }
8733 1 1. substringBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return null;
8734
    }
8735
8736
    // endsWith
8737
    //-----------------------------------------------------------------------
8738
8739
    /**
8740
     * <p>Searches a String for substrings delimited by a start and end tag,
8741
     * returning all matching substrings in an array.</p>
8742
     *
8743
     * <p>A {@code null} input String returns {@code null}.
8744
     * A {@code null} open/close returns {@code null} (no match).
8745
     * An empty ("") open/close returns {@code null} (no match).</p>
8746
     *
8747
     * <pre>
8748
     * StringUtils.substringsBetween("[a][b][c]", "[", "]") = ["a","b","c"]
8749
     * StringUtils.substringsBetween(null, *, *)            = null
8750
     * StringUtils.substringsBetween(*, null, *)            = null
8751
     * StringUtils.substringsBetween(*, *, null)            = null
8752
     * StringUtils.substringsBetween("", "[", "]")          = []
8753
     * </pre>
8754
     *
8755
     * @param str  the String containing the substrings, null returns null, empty returns empty
8756
     * @param open  the String identifying the start of the substring, empty returns null
8757
     * @param close  the String identifying the end of the substring, empty returns null
8758
     * @return a String Array of substrings, or {@code null} if no match
8759
     * @since 2.3
8760
     */
8761
    public static String[] substringsBetween(final String str, final String open, final String close) {
8762 3 1. substringsBetween : negated conditional → KILLED
2. substringsBetween : negated conditional → KILLED
3. substringsBetween : negated conditional → KILLED
        if (str == null || isEmpty(open) || isEmpty(close)) {
8763 1 1. substringsBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8764
        }
8765
        final int strLen = str.length();
8766 1 1. substringsBetween : negated conditional → KILLED
        if (strLen == 0) {
8767 1 1. substringsBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ArrayUtils.EMPTY_STRING_ARRAY;
8768
        }
8769
        final int closeLen = close.length();
8770
        final int openLen = open.length();
8771
        final List<String> list = new ArrayList<>();
8772
        int pos = 0;
8773 3 1. substringsBetween : changed conditional boundary → SURVIVED
2. substringsBetween : Replaced integer subtraction with addition → SURVIVED
3. substringsBetween : negated conditional → KILLED
        while (pos < strLen - closeLen) {
8774
            int start = str.indexOf(open, pos);
8775 2 1. substringsBetween : changed conditional boundary → KILLED
2. substringsBetween : negated conditional → KILLED
            if (start < 0) {
8776
                break;
8777
            }
8778 1 1. substringsBetween : Replaced integer addition with subtraction → KILLED
            start += openLen;
8779
            final int end = str.indexOf(close, start);
8780 2 1. substringsBetween : changed conditional boundary → SURVIVED
2. substringsBetween : negated conditional → KILLED
            if (end < 0) {
8781
                break;
8782
            }
8783
            list.add(str.substring(start, end));
8784 1 1. substringsBetween : Replaced integer addition with subtraction → KILLED
            pos = end + closeLen;
8785
        }
8786 1 1. substringsBetween : negated conditional → KILLED
        if (list.isEmpty()) {
8787 1 1. substringsBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8788
        }
8789 1 1. substringsBetween : mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return list.toArray(new String [list.size()]);
8790
    }
8791
8792
    /**
8793
     * <p>Swaps the case of a String changing upper and title case to
8794
     * lower case, and lower case to upper case.</p>
8795
     *
8796
     * <ul>
8797
     *  <li>Upper case character converts to Lower case</li>
8798
     *  <li>Title case character converts to Lower case</li>
8799
     *  <li>Lower case character converts to Upper case</li>
8800
     * </ul>
8801
     *
8802
     * <p>For a word based algorithm, see {@link org.apache.commons.lang3.text.WordUtils#swapCase(String)}.
8803
     * A {@code null} input String returns {@code null}.</p>
8804
     *
8805
     * <pre>
8806
     * StringUtils.swapCase(null)                 = null
8807
     * StringUtils.swapCase("")                   = ""
8808
     * StringUtils.swapCase("The dog has a BONE") = "tHE DOG HAS A bone"
8809
     * </pre>
8810
     *
8811
     * <p>NOTE: This method changed in Lang version 2.0.
8812
     * It no longer performs a word based algorithm.
8813
     * If you only use ASCII, you will notice no change.
8814
     * That functionality is available in org.apache.commons.lang3.text.WordUtils.</p>
8815
     *
8816
     * @param str  the String to swap case, may be null
8817
     * @return the changed String, {@code null} if null String input
8818
     */
8819
    public static String swapCase(final String str) {
8820 1 1. swapCase : negated conditional → KILLED
        if (isEmpty(str)) {
8821 1 1. swapCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::swapCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
8822
        }
8823
8824
        final int strLen = str.length();
8825
        final int newCodePoints[] = new int[strLen]; // cannot be longer than the char array
8826
        int outOffset = 0;
8827 2 1. swapCase : changed conditional boundary → KILLED
2. swapCase : negated conditional → KILLED
        for (int i = 0; i < strLen; ) {
8828
            final int oldCodepoint = str.codePointAt(i);
8829
            final int newCodePoint;
8830 1 1. swapCase : negated conditional → KILLED
            if (Character.isUpperCase(oldCodepoint)) {
8831
                newCodePoint = Character.toLowerCase(oldCodepoint);
8832 1 1. swapCase : negated conditional → KILLED
            } else if (Character.isTitleCase(oldCodepoint)) {
8833
                newCodePoint = Character.toLowerCase(oldCodepoint);
8834 1 1. swapCase : negated conditional → KILLED
            } else if (Character.isLowerCase(oldCodepoint)) {
8835
                newCodePoint = Character.toUpperCase(oldCodepoint);
8836
            } else {
8837
                newCodePoint = oldCodepoint;
8838
            }
8839 1 1. swapCase : Changed increment from 1 to -1 → KILLED
            newCodePoints[outOffset++] = newCodePoint;
8840 1 1. swapCase : Replaced integer addition with subtraction → KILLED
            i += Character.charCount(newCodePoint);
8841
         }
8842 1 1. swapCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::swapCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(newCodePoints, 0, outOffset);
8843
    }
8844
8845
    /**
8846
     * <p>Converts a {@code CharSequence} into an array of code points.</p>
8847
     *
8848
     * <p>Valid pairs of surrogate code units will be converted into a single supplementary
8849
     * code point. Isolated surrogate code units (i.e. a high surrogate not followed by a low surrogate or
8850
     * a low surrogate not preceded by a high surrogate) will be returned as-is.</p>
8851
     *
8852
     * <pre>
8853
     * StringUtils.toCodePoints(null)   =  null
8854
     * StringUtils.toCodePoints("")     =  []  // empty array
8855
     * </pre>
8856
     *
8857
     * @param str the character sequence to convert
8858
     * @return an array of code points
8859
     * @since 3.6
8860
     */
8861
    public static int[] toCodePoints(final CharSequence str) {
8862 1 1. toCodePoints : negated conditional → KILLED
        if (str == null) {
8863 1 1. toCodePoints : mutated return of Object value for org/apache/commons/lang3/StringUtils::toCodePoints to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
8864
        }
8865 1 1. toCodePoints : negated conditional → KILLED
        if (str.length() == 0) {
8866 1 1. toCodePoints : mutated return of Object value for org/apache/commons/lang3/StringUtils::toCodePoints to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return ArrayUtils.EMPTY_INT_ARRAY;
8867
        }
8868
8869
        final String s = str.toString();
8870
        final int[] result = new int[s.codePointCount(0, s.length())];
8871
        int index = 0;
8872 3 1. toCodePoints : changed conditional boundary → KILLED
2. toCodePoints : Changed increment from 1 to -1 → KILLED
3. toCodePoints : negated conditional → KILLED
        for (int i = 0; i < result.length; i++) {
8873
            result[i] = s.codePointAt(index);
8874 1 1. toCodePoints : Replaced integer addition with subtraction → KILLED
            index += Character.charCount(result[i]);
8875
        }
8876 1 1. toCodePoints : mutated return of Object value for org/apache/commons/lang3/StringUtils::toCodePoints to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return result;
8877
    }
8878
8879
    /**
8880
     * Converts a <code>byte[]</code> to a String using the specified character encoding.
8881
     *
8882
     * @param bytes
8883
     *            the byte array to read from
8884
     * @param charset
8885
     *            the encoding to use, if null then use the platform default
8886
     * @return a new String
8887
     * @throws NullPointerException
8888
     *             if {@code bytes} is null
8889
     * @since 3.2
8890
     * @since 3.3 No longer throws {@link UnsupportedEncodingException}.
8891
     */
8892
    public static String toEncodedString(final byte[] bytes, final Charset charset) {
8893 1 1. toEncodedString : mutated return of Object value for org/apache/commons/lang3/StringUtils::toEncodedString to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(bytes, Charsets.toCharset(charset));
8894
    }
8895
8896
    /**
8897
     * Converts a <code>byte[]</code> to a String using the specified character encoding.
8898
     *
8899
     * @param bytes
8900
     *            the byte array to read from
8901
     * @param charsetName
8902
     *            the encoding to use, if null then use the platform default
8903
     * @return a new String
8904
     * @throws UnsupportedEncodingException
8905
     *             If the named charset is not supported
8906
     * @throws NullPointerException
8907
     *             if the input is null
8908
     * @deprecated use {@link StringUtils#toEncodedString(byte[], Charset)} instead of String constants in your code
8909
     * @since 3.1
8910
     */
8911
    @Deprecated
8912
    public static String toString(final byte[] bytes, final String charsetName) throws UnsupportedEncodingException {
8913 2 1. toString : negated conditional → KILLED
2. toString : mutated return of Object value for org/apache/commons/lang3/StringUtils::toString to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return charsetName != null ? new String(bytes, charsetName) : new String(bytes, Charset.defaultCharset());
8914
    }
8915
8916
    // Trim
8917
    //-----------------------------------------------------------------------
8918
    /**
8919
     * <p>Removes control characters (char &lt;= 32) from both
8920
     * ends of this String, handling {@code null} by returning
8921
     * {@code null}.</p>
8922
     *
8923
     * <p>The String is trimmed using {@link String#trim()}.
8924
     * Trim removes start and end characters &lt;= 32.
8925
     * To strip whitespace use {@link #strip(String)}.</p>
8926
     *
8927
     * <p>To trim your choice of characters, use the
8928
     * {@link #strip(String, String)} methods.</p>
8929
     *
8930
     * <pre>
8931
     * StringUtils.trim(null)          = null
8932
     * StringUtils.trim("")            = ""
8933
     * StringUtils.trim("     ")       = ""
8934
     * StringUtils.trim("abc")         = "abc"
8935
     * StringUtils.trim("    abc    ") = "abc"
8936
     * </pre>
8937
     *
8938
     * @param str  the String to be trimmed, may be null
8939
     * @return the trimmed string, {@code null} if null String input
8940
     */
8941
    public static String trim(final String str) {
8942 2 1. trim : negated conditional → KILLED
2. trim : mutated return of Object value for org/apache/commons/lang3/StringUtils::trim to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str == null ? null : str.trim();
8943
    }
8944
8945
    /**
8946
     * <p>Removes control characters (char &lt;= 32) from both
8947
     * ends of this String returning an empty String ("") if the String
8948
     * is empty ("") after the trim or if it is {@code null}.
8949
     *
8950
     * <p>The String is trimmed using {@link String#trim()}.
8951
     * Trim removes start and end characters &lt;= 32.
8952
     * To strip whitespace use {@link #stripToEmpty(String)}.</p>
8953
     *
8954
     * <pre>
8955
     * StringUtils.trimToEmpty(null)          = ""
8956
     * StringUtils.trimToEmpty("")            = ""
8957
     * StringUtils.trimToEmpty("     ")       = ""
8958
     * StringUtils.trimToEmpty("abc")         = "abc"
8959
     * StringUtils.trimToEmpty("    abc    ") = "abc"
8960
     * </pre>
8961
     *
8962
     * @param str  the String to be trimmed, may be null
8963
     * @return the trimmed String, or an empty String if {@code null} input
8964
     * @since 2.0
8965
     */
8966
    public static String trimToEmpty(final String str) {
8967 2 1. trimToEmpty : negated conditional → KILLED
2. trimToEmpty : mutated return of Object value for org/apache/commons/lang3/StringUtils::trimToEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str == null ? EMPTY : str.trim();
8968
    }
8969
8970
    /**
8971
     * <p>Removes control characters (char &lt;= 32) from both
8972
     * ends of this String returning {@code null} if the String is
8973
     * empty ("") after the trim or if it is {@code null}.
8974
     *
8975
     * <p>The String is trimmed using {@link String#trim()}.
8976
     * Trim removes start and end characters &lt;= 32.
8977
     * To strip whitespace use {@link #stripToNull(String)}.</p>
8978
     *
8979
     * <pre>
8980
     * StringUtils.trimToNull(null)          = null
8981
     * StringUtils.trimToNull("")            = null
8982
     * StringUtils.trimToNull("     ")       = null
8983
     * StringUtils.trimToNull("abc")         = "abc"
8984
     * StringUtils.trimToNull("    abc    ") = "abc"
8985
     * </pre>
8986
     *
8987
     * @param str  the String to be trimmed, may be null
8988
     * @return the trimmed String,
8989
     *  {@code null} if only chars &lt;= 32, empty or null String input
8990
     * @since 2.0
8991
     */
8992
    public static String trimToNull(final String str) {
8993
        final String ts = trim(str);
8994 2 1. trimToNull : negated conditional → KILLED
2. trimToNull : mutated return of Object value for org/apache/commons/lang3/StringUtils::trimToNull to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return isEmpty(ts) ? null : ts;
8995
    }
8996
8997
    /**
8998
     * <p>Truncates a String. This will turn
8999
     * "Now is the time for all good men" into "Now is the time for".</p>
9000
     *
9001
     * <p>Specifically:</p>
9002
     * <ul>
9003
     *   <li>If {@code str} is less than {@code maxWidth} characters
9004
     *       long, return it.</li>
9005
     *   <li>Else truncate it to {@code substring(str, 0, maxWidth)}.</li>
9006
     *   <li>If {@code maxWidth} is less than {@code 0}, throw an
9007
     *       {@code IllegalArgumentException}.</li>
9008
     *   <li>In no case will it return a String of length greater than
9009
     *       {@code maxWidth}.</li>
9010
     * </ul>
9011
     *
9012
     * <pre>
9013
     * StringUtils.truncate(null, 0)       = null
9014
     * StringUtils.truncate(null, 2)       = null
9015
     * StringUtils.truncate("", 4)         = ""
9016
     * StringUtils.truncate("abcdefg", 4)  = "abcd"
9017
     * StringUtils.truncate("abcdefg", 6)  = "abcdef"
9018
     * StringUtils.truncate("abcdefg", 7)  = "abcdefg"
9019
     * StringUtils.truncate("abcdefg", 8)  = "abcdefg"
9020
     * StringUtils.truncate("abcdefg", -1) = throws an IllegalArgumentException
9021
     * </pre>
9022
     *
9023
     * @param str  the String to truncate, may be null
9024
     * @param maxWidth  maximum length of result String, must be positive
9025
     * @return truncated String, {@code null} if null String input
9026
     * @since 3.5
9027
     */
9028
    public static String truncate(final String str, final int maxWidth) {
9029 1 1. truncate : mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return truncate(str, 0, maxWidth);
9030
    }
9031
9032
    /**
9033
     * <p>Truncates a String. This will turn
9034
     * "Now is the time for all good men" into "is the time for all".</p>
9035
     *
9036
     * <p>Works like {@code truncate(String, int)}, but allows you to specify
9037
     * a "left edge" offset.
9038
     *
9039
     * <p>Specifically:</p>
9040
     * <ul>
9041
     *   <li>If {@code str} is less than {@code maxWidth} characters
9042
     *       long, return it.</li>
9043
     *   <li>Else truncate it to {@code substring(str, offset, maxWidth)}.</li>
9044
     *   <li>If {@code maxWidth} is less than {@code 0}, throw an
9045
     *       {@code IllegalArgumentException}.</li>
9046
     *   <li>If {@code offset} is less than {@code 0}, throw an
9047
     *       {@code IllegalArgumentException}.</li>
9048
     *   <li>In no case will it return a String of length greater than
9049
     *       {@code maxWidth}.</li>
9050
     * </ul>
9051
     *
9052
     * <pre>
9053
     * StringUtils.truncate(null, 0, 0) = null
9054
     * StringUtils.truncate(null, 2, 4) = null
9055
     * StringUtils.truncate("", 0, 10) = ""
9056
     * StringUtils.truncate("", 2, 10) = ""
9057
     * StringUtils.truncate("abcdefghij", 0, 3) = "abc"
9058
     * StringUtils.truncate("abcdefghij", 5, 6) = "fghij"
9059
     * StringUtils.truncate("raspberry peach", 10, 15) = "peach"
9060
     * StringUtils.truncate("abcdefghijklmno", 0, 10) = "abcdefghij"
9061
     * StringUtils.truncate("abcdefghijklmno", -1, 10) = throws an IllegalArgumentException
9062
     * StringUtils.truncate("abcdefghijklmno", Integer.MIN_VALUE, 10) = "abcdefghij"
9063
     * StringUtils.truncate("abcdefghijklmno", Integer.MIN_VALUE, Integer.MAX_VALUE) = "abcdefghijklmno"
9064
     * StringUtils.truncate("abcdefghijklmno", 0, Integer.MAX_VALUE) = "abcdefghijklmno"
9065
     * StringUtils.truncate("abcdefghijklmno", 1, 10) = "bcdefghijk"
9066
     * StringUtils.truncate("abcdefghijklmno", 2, 10) = "cdefghijkl"
9067
     * StringUtils.truncate("abcdefghijklmno", 3, 10) = "defghijklm"
9068
     * StringUtils.truncate("abcdefghijklmno", 4, 10) = "efghijklmn"
9069
     * StringUtils.truncate("abcdefghijklmno", 5, 10) = "fghijklmno"
9070
     * StringUtils.truncate("abcdefghijklmno", 5, 5) = "fghij"
9071
     * StringUtils.truncate("abcdefghijklmno", 5, 3) = "fgh"
9072
     * StringUtils.truncate("abcdefghijklmno", 10, 3) = "klm"
9073
     * StringUtils.truncate("abcdefghijklmno", 10, Integer.MAX_VALUE) = "klmno"
9074
     * StringUtils.truncate("abcdefghijklmno", 13, 1) = "n"
9075
     * StringUtils.truncate("abcdefghijklmno", 13, Integer.MAX_VALUE) = "no"
9076
     * StringUtils.truncate("abcdefghijklmno", 14, 1) = "o"
9077
     * StringUtils.truncate("abcdefghijklmno", 14, Integer.MAX_VALUE) = "o"
9078
     * StringUtils.truncate("abcdefghijklmno", 15, 1) = ""
9079
     * StringUtils.truncate("abcdefghijklmno", 15, Integer.MAX_VALUE) = ""
9080
     * StringUtils.truncate("abcdefghijklmno", Integer.MAX_VALUE, Integer.MAX_VALUE) = ""
9081
     * StringUtils.truncate("abcdefghij", 3, -1) = throws an IllegalArgumentException
9082
     * StringUtils.truncate("abcdefghij", -2, 4) = throws an IllegalArgumentException
9083
     * </pre>
9084
     *
9085
     * @param str  the String to check, may be null
9086
     * @param offset  left edge of source String
9087
     * @param maxWidth  maximum length of result String, must be positive
9088
     * @return truncated String, {@code null} if null String input
9089
     * @since 3.5
9090
     */
9091
    public static String truncate(final String str, final int offset, final int maxWidth) {
9092 2 1. truncate : changed conditional boundary → KILLED
2. truncate : negated conditional → KILLED
        if (offset < 0) {
9093
            throw new IllegalArgumentException("offset cannot be negative");
9094
        }
9095 2 1. truncate : changed conditional boundary → KILLED
2. truncate : negated conditional → KILLED
        if (maxWidth < 0) {
9096
            throw new IllegalArgumentException("maxWith cannot be negative");
9097
        }
9098 1 1. truncate : negated conditional → KILLED
        if (str == null) {
9099 1 1. truncate : mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
9100
        }
9101 2 1. truncate : changed conditional boundary → SURVIVED
2. truncate : negated conditional → KILLED
        if (offset > str.length()) {
9102 1 1. truncate : mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return EMPTY;
9103
        }
9104 2 1. truncate : changed conditional boundary → SURVIVED
2. truncate : negated conditional → KILLED
        if (str.length() > maxWidth) {
9105 4 1. truncate : changed conditional boundary → SURVIVED
2. truncate : Replaced integer addition with subtraction → KILLED
3. truncate : Replaced integer addition with subtraction → KILLED
4. truncate : negated conditional → KILLED
            final int ix = offset + maxWidth > str.length() ? str.length() : offset + maxWidth;
9106 1 1. truncate : mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str.substring(offset, ix);
9107
        }
9108 1 1. truncate : mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.substring(offset);
9109
    }
9110
9111
    /**
9112
     * <p>Uncapitalizes a String, changing the first character to lower case as
9113
     * per {@link Character#toLowerCase(int)}. No other characters are changed.</p>
9114
     *
9115
     * <p>For a word based algorithm, see {@link org.apache.commons.lang3.text.WordUtils#uncapitalize(String)}.
9116
     * A {@code null} input String returns {@code null}.</p>
9117
     *
9118
     * <pre>
9119
     * StringUtils.uncapitalize(null)  = null
9120
     * StringUtils.uncapitalize("")    = ""
9121
     * StringUtils.uncapitalize("cat") = "cat"
9122
     * StringUtils.uncapitalize("Cat") = "cat"
9123
     * StringUtils.uncapitalize("CAT") = "cAT"
9124
     * </pre>
9125
     *
9126
     * @param str the String to uncapitalize, may be null
9127
     * @return the uncapitalized String, {@code null} if null String input
9128
     * @see org.apache.commons.lang3.text.WordUtils#uncapitalize(String)
9129
     * @see #capitalize(String)
9130
     * @since 2.0
9131
     */
9132
    public static String uncapitalize(final String str) {
9133
        int strLen;
9134 2 1. uncapitalize : negated conditional → KILLED
2. uncapitalize : negated conditional → KILLED
        if (str == null || (strLen = str.length()) == 0) {
9135 1 1. uncapitalize : mutated return of Object value for org/apache/commons/lang3/StringUtils::uncapitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9136
        }
9137
9138
        final int firstCodepoint = str.codePointAt(0);
9139
        final int newCodePoint = Character.toLowerCase(firstCodepoint);
9140 1 1. uncapitalize : negated conditional → KILLED
        if (firstCodepoint == newCodePoint) {
9141
            // already capitalized
9142 1 1. uncapitalize : mutated return of Object value for org/apache/commons/lang3/StringUtils::uncapitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9143
        }
9144
9145
        final int newCodePoints[] = new int[strLen]; // cannot be longer than the char array
9146
        int outOffset = 0;
9147 1 1. uncapitalize : Changed increment from 1 to -1 → KILLED
        newCodePoints[outOffset++] = newCodePoint; // copy the first codepoint
9148 2 1. uncapitalize : changed conditional boundary → KILLED
2. uncapitalize : negated conditional → KILLED
        for (int inOffset = Character.charCount(firstCodepoint); inOffset < strLen; ) {
9149
            final int codepoint = str.codePointAt(inOffset);
9150 1 1. uncapitalize : Changed increment from 1 to -1 → KILLED
            newCodePoints[outOffset++] = codepoint; // copy the remaining ones
9151 1 1. uncapitalize : Replaced integer addition with subtraction → KILLED
            inOffset += Character.charCount(codepoint);
9152
         }
9153 1 1. uncapitalize : mutated return of Object value for org/apache/commons/lang3/StringUtils::uncapitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return new String(newCodePoints, 0, outOffset);
9154
    }
9155
9156
    /**
9157
     * <p>
9158
     * Unwraps a given string from a character.
9159
     * </p>
9160
     *
9161
     * <pre>
9162
     * StringUtils.unwrap(null, null)         = null
9163
     * StringUtils.unwrap(null, '\0')         = null
9164
     * StringUtils.unwrap(null, '1')          = null
9165
     * StringUtils.unwrap("\'abc\'", '\'')    = "abc"
9166
     * StringUtils.unwrap("AABabcBAA", 'A')  = "ABabcBA"
9167
     * StringUtils.unwrap("A", '#')           = "A"
9168
     * StringUtils.unwrap("#A", '#')          = "#A"
9169
     * StringUtils.unwrap("A#", '#')          = "A#"
9170
     * </pre>
9171
     *
9172
     * @param str
9173
     *          the String to be unwrapped, can be null
9174
     * @param wrapChar
9175
     *          the character used to unwrap
9176
     * @return unwrapped String or the original string
9177
     *          if it is not quoted properly with the wrapChar
9178
     * @since 3.6
9179
     */
9180
    public static String unwrap(final String str, final char wrapChar) {
9181 2 1. unwrap : negated conditional → KILLED
2. unwrap : negated conditional → KILLED
        if (isEmpty(str) || wrapChar == CharUtils.NUL) {
9182 1 1. unwrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9183
        }
9184
9185 3 1. unwrap : Replaced integer subtraction with addition → KILLED
2. unwrap : negated conditional → KILLED
3. unwrap : negated conditional → KILLED
        if (str.charAt(0) == wrapChar && str.charAt(str.length() - 1) == wrapChar) {
9186
            final int startIndex = 0;
9187 1 1. unwrap : Replaced integer subtraction with addition → KILLED
            final int endIndex = str.length() - 1;
9188 1 1. unwrap : negated conditional → KILLED
            if (endIndex != -1) {
9189 1 1. unwrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return str.substring(startIndex + 1, endIndex);
9190
            }
9191
        }
9192
9193 1 1. unwrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
9194
    }
9195
9196
    /**
9197
     * <p>
9198
     * Unwraps a given string from anther string.
9199
     * </p>
9200
     *
9201
     * <pre>
9202
     * StringUtils.unwrap(null, null)         = null
9203
     * StringUtils.unwrap(null, "")           = null
9204
     * StringUtils.unwrap(null, "1")          = null
9205
     * StringUtils.unwrap("\'abc\'", "\'")    = "abc"
9206
     * StringUtils.unwrap("\"abc\"", "\"")    = "abc"
9207
     * StringUtils.unwrap("AABabcBAA", "AA")  = "BabcB"
9208
     * StringUtils.unwrap("A", "#")           = "A"
9209
     * StringUtils.unwrap("#A", "#")          = "#A"
9210
     * StringUtils.unwrap("A#", "#")          = "A#"
9211
     * </pre>
9212
     *
9213
     * @param str
9214
     *          the String to be unwrapped, can be null
9215
     * @param wrapToken
9216
     *          the String used to unwrap
9217
     * @return unwrapped String or the original string
9218
     *          if it is not quoted properly with the wrapToken
9219
     * @since 3.6
9220
     */
9221
    public static String unwrap(final String str, final String wrapToken) {
9222 2 1. unwrap : negated conditional → KILLED
2. unwrap : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(wrapToken)) {
9223 1 1. unwrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9224
        }
9225
9226 2 1. unwrap : negated conditional → KILLED
2. unwrap : negated conditional → KILLED
        if (startsWith(str, wrapToken) && endsWith(str, wrapToken)) {
9227
            final int startIndex = str.indexOf(wrapToken);
9228
            final int endIndex = str.lastIndexOf(wrapToken);
9229
            final int wrapLength = wrapToken.length();
9230 2 1. unwrap : negated conditional → KILLED
2. unwrap : negated conditional → KILLED
            if (startIndex != -1 && endIndex != -1) {
9231 2 1. unwrap : Replaced integer addition with subtraction → KILLED
2. unwrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
                return str.substring(startIndex + wrapLength, endIndex);
9232
            }
9233
        }
9234
9235 1 1. unwrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str;
9236
    }
9237
9238
    // Case conversion
9239
    //-----------------------------------------------------------------------
9240
    /**
9241
     * <p>Converts a String to upper case as per {@link String#toUpperCase()}.</p>
9242
     *
9243
     * <p>A {@code null} input String returns {@code null}.</p>
9244
     *
9245
     * <pre>
9246
     * StringUtils.upperCase(null)  = null
9247
     * StringUtils.upperCase("")    = ""
9248
     * StringUtils.upperCase("aBc") = "ABC"
9249
     * </pre>
9250
     *
9251
     * <p><strong>Note:</strong> As described in the documentation for {@link String#toUpperCase()},
9252
     * the result of this method is affected by the current locale.
9253
     * For platform-independent case transformations, the method {@link #lowerCase(String, Locale)}
9254
     * should be used with a specific locale (e.g. {@link Locale#ENGLISH}).</p>
9255
     *
9256
     * @param str  the String to upper case, may be null
9257
     * @return the upper cased String, {@code null} if null String input
9258
     */
9259
    public static String upperCase(final String str) {
9260 1 1. upperCase : negated conditional → KILLED
        if (str == null) {
9261 1 1. upperCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
9262
        }
9263 1 1. upperCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.toUpperCase();
9264
    }
9265
9266
    /**
9267
     * <p>Converts a String to upper case as per {@link String#toUpperCase(Locale)}.</p>
9268
     *
9269
     * <p>A {@code null} input String returns {@code null}.</p>
9270
     *
9271
     * <pre>
9272
     * StringUtils.upperCase(null, Locale.ENGLISH)  = null
9273
     * StringUtils.upperCase("", Locale.ENGLISH)    = ""
9274
     * StringUtils.upperCase("aBc", Locale.ENGLISH) = "ABC"
9275
     * </pre>
9276
     *
9277
     * @param str  the String to upper case, may be null
9278
     * @param locale  the locale that defines the case transformation rules, must not be null
9279
     * @return the upper cased String, {@code null} if null String input
9280
     * @since 2.5
9281
     */
9282
    public static String upperCase(final String str, final Locale locale) {
9283 1 1. upperCase : negated conditional → KILLED
        if (str == null) {
9284 1 1. upperCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return null;
9285
        }
9286 1 1. upperCase : mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return str.toUpperCase(locale);
9287
    }
9288
9289
    /**
9290
     * Returns the string representation of the {@code char} array or null.
9291
     *
9292
     * @param value the character array.
9293
     * @return a String or null
9294
     * @see String#valueOf(char[])
9295
     * @since 3.9
9296
     */
9297
    public static String valueOf(final char[] value) {
9298 2 1. valueOf : negated conditional → KILLED
2. valueOf : mutated return of Object value for org/apache/commons/lang3/StringUtils::valueOf to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return value == null ? null : String.valueOf(value);
9299
    }
9300
9301
    /**
9302
     * <p>
9303
     * Wraps a string with a char.
9304
     * </p>
9305
     *
9306
     * <pre>
9307
     * StringUtils.wrap(null, *)        = null
9308
     * StringUtils.wrap("", *)          = ""
9309
     * StringUtils.wrap("ab", '\0')     = "ab"
9310
     * StringUtils.wrap("ab", 'x')      = "xabx"
9311
     * StringUtils.wrap("ab", '\'')     = "'ab'"
9312
     * StringUtils.wrap("\"ab\"", '\"') = "\"\"ab\"\""
9313
     * </pre>
9314
     *
9315
     * @param str
9316
     *            the string to be wrapped, may be {@code null}
9317
     * @param wrapWith
9318
     *            the char that will wrap {@code str}
9319
     * @return the wrapped string, or {@code null} if {@code str==null}
9320
     * @since 3.4
9321
     */
9322
    public static String wrap(final String str, final char wrapWith) {
9323
9324 2 1. wrap : negated conditional → KILLED
2. wrap : negated conditional → KILLED
        if (isEmpty(str) || wrapWith == CharUtils.NUL) {
9325 1 1. wrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9326
        }
9327
9328 1 1. wrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return wrapWith + str + wrapWith;
9329
    }
9330
9331
    /**
9332
     * <p>
9333
     * Wraps a String with another String.
9334
     * </p>
9335
     *
9336
     * <p>
9337
     * A {@code null} input String returns {@code null}.
9338
     * </p>
9339
     *
9340
     * <pre>
9341
     * StringUtils.wrap(null, *)         = null
9342
     * StringUtils.wrap("", *)           = ""
9343
     * StringUtils.wrap("ab", null)      = "ab"
9344
     * StringUtils.wrap("ab", "x")       = "xabx"
9345
     * StringUtils.wrap("ab", "\"")      = "\"ab\""
9346
     * StringUtils.wrap("\"ab\"", "\"")  = "\"\"ab\"\""
9347
     * StringUtils.wrap("ab", "'")       = "'ab'"
9348
     * StringUtils.wrap("'abcd'", "'")   = "''abcd''"
9349
     * StringUtils.wrap("\"abcd\"", "'") = "'\"abcd\"'"
9350
     * StringUtils.wrap("'abcd'", "\"")  = "\"'abcd'\""
9351
     * </pre>
9352
     *
9353
     * @param str
9354
     *            the String to be wrapper, may be null
9355
     * @param wrapWith
9356
     *            the String that will wrap str
9357
     * @return wrapped String, {@code null} if null String input
9358
     * @since 3.4
9359
     */
9360
    public static String wrap(final String str, final String wrapWith) {
9361
9362 2 1. wrap : negated conditional → KILLED
2. wrap : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(wrapWith)) {
9363 1 1. wrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9364
        }
9365
9366 1 1. wrap : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return wrapWith.concat(str).concat(wrapWith);
9367
    }
9368
9369
    /**
9370
     * <p>
9371
     * Wraps a string with a char if that char is missing from the start or end of the given string.
9372
     * </p>
9373
     *
9374
     * <pre>
9375
     * StringUtils.wrapIfMissing(null, *)        = null
9376
     * StringUtils.wrapIfMissing("", *)          = ""
9377
     * StringUtils.wrapIfMissing("ab", '\0')     = "ab"
9378
     * StringUtils.wrapIfMissing("ab", 'x')      = "xabx"
9379
     * StringUtils.wrapIfMissing("ab", '\'')     = "'ab'"
9380
     * StringUtils.wrapIfMissing("\"ab\"", '\"') = "\"ab\""
9381
     * StringUtils.wrapIfMissing("/", '/')  = "/"
9382
     * StringUtils.wrapIfMissing("a/b/c", '/')  = "/a/b/c/"
9383
     * StringUtils.wrapIfMissing("/a/b/c", '/')  = "/a/b/c/"
9384
     * StringUtils.wrapIfMissing("a/b/c/", '/')  = "/a/b/c/"
9385
     * </pre>
9386
     *
9387
     * @param str
9388
     *            the string to be wrapped, may be {@code null}
9389
     * @param wrapWith
9390
     *            the char that will wrap {@code str}
9391
     * @return the wrapped string, or {@code null} if {@code str==null}
9392
     * @since 3.5
9393
     */
9394
    public static String wrapIfMissing(final String str, final char wrapWith) {
9395 2 1. wrapIfMissing : negated conditional → KILLED
2. wrapIfMissing : negated conditional → KILLED
        if (isEmpty(str) || wrapWith == CharUtils.NUL) {
9396 1 1. wrapIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9397
        }
9398 1 1. wrapIfMissing : Replaced integer addition with subtraction → KILLED
        final StringBuilder builder = new StringBuilder(str.length() + 2);
9399 1 1. wrapIfMissing : negated conditional → KILLED
        if (str.charAt(0) != wrapWith) {
9400
            builder.append(wrapWith);
9401
        }
9402
        builder.append(str);
9403 2 1. wrapIfMissing : Replaced integer subtraction with addition → KILLED
2. wrapIfMissing : negated conditional → KILLED
        if (str.charAt(str.length() - 1) != wrapWith) {
9404
            builder.append(wrapWith);
9405
        }
9406 1 1. wrapIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return builder.toString();
9407
    }
9408
9409
    /**
9410
     * <p>
9411
     * Wraps a string with a string if that string is missing from the start or end of the given string.
9412
     * </p>
9413
     *
9414
     * <pre>
9415
     * StringUtils.wrapIfMissing(null, *)         = null
9416
     * StringUtils.wrapIfMissing("", *)           = ""
9417
     * StringUtils.wrapIfMissing("ab", null)      = "ab"
9418
     * StringUtils.wrapIfMissing("ab", "x")       = "xabx"
9419
     * StringUtils.wrapIfMissing("ab", "\"")      = "\"ab\""
9420
     * StringUtils.wrapIfMissing("\"ab\"", "\"")  = "\"ab\""
9421
     * StringUtils.wrapIfMissing("ab", "'")       = "'ab'"
9422
     * StringUtils.wrapIfMissing("'abcd'", "'")   = "'abcd'"
9423
     * StringUtils.wrapIfMissing("\"abcd\"", "'") = "'\"abcd\"'"
9424
     * StringUtils.wrapIfMissing("'abcd'", "\"")  = "\"'abcd'\""
9425
     * StringUtils.wrapIfMissing("/", "/")  = "/"
9426
     * StringUtils.wrapIfMissing("a/b/c", "/")  = "/a/b/c/"
9427
     * StringUtils.wrapIfMissing("/a/b/c", "/")  = "/a/b/c/"
9428
     * StringUtils.wrapIfMissing("a/b/c/", "/")  = "/a/b/c/"
9429
     * </pre>
9430
     *
9431
     * @param str
9432
     *            the string to be wrapped, may be {@code null}
9433
     * @param wrapWith
9434
     *            the char that will wrap {@code str}
9435
     * @return the wrapped string, or {@code null} if {@code str==null}
9436
     * @since 3.5
9437
     */
9438
    public static String wrapIfMissing(final String str, final String wrapWith) {
9439 2 1. wrapIfMissing : negated conditional → KILLED
2. wrapIfMissing : negated conditional → KILLED
        if (isEmpty(str) || isEmpty(wrapWith)) {
9440 1 1. wrapIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
            return str;
9441
        }
9442 2 1. wrapIfMissing : Replaced integer addition with subtraction → SURVIVED
2. wrapIfMissing : Replaced integer addition with subtraction → SURVIVED
        final StringBuilder builder = new StringBuilder(str.length() + wrapWith.length() + wrapWith.length());
9443 1 1. wrapIfMissing : negated conditional → KILLED
        if (!str.startsWith(wrapWith)) {
9444
            builder.append(wrapWith);
9445
        }
9446
        builder.append(str);
9447 1 1. wrapIfMissing : negated conditional → KILLED
        if (!str.endsWith(wrapWith)) {
9448
            builder.append(wrapWith);
9449
        }
9450 1 1. wrapIfMissing : mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED
        return builder.toString();
9451
    }
9452
9453
    /**
9454
     * <p>{@code StringUtils} instances should NOT be constructed in
9455
     * standard programming. Instead, the class should be used as
9456
     * {@code StringUtils.trim(" foo ");}.</p>
9457
     *
9458
     * <p>This constructor is public to permit tools that require a JavaBean
9459
     * instance to operate.</p>
9460
     */
9461
    public StringUtils() {
9462
        super();
9463
    }
9464
9465
}

Mutations

214

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

254

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

294

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

335

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

336

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

340

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
Replaced integer addition with subtraction → KILLED

341

1.1
Location : abbreviate
Killed by : none
Replaced integer addition with subtraction → SURVIVED

2.2
Location : abbreviate
Killed by : none
Replaced integer addition with subtraction → SURVIVED

343

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
changed conditional boundary → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

346

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
changed conditional boundary → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

347

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

349

1.1
Location : abbreviate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

352

1.1
Location : abbreviate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : abbreviate
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3.3
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer subtraction with addition → KILLED

4.4
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

353

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer subtraction with addition → KILLED

2.2
Location : abbreviate
Killed by : none
Replaced integer subtraction with addition → SURVIVED

355

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
changed conditional boundary → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer addition with subtraction → KILLED

3.3
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
negated conditional → KILLED

356

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
Replaced integer subtraction with addition → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

358

1.1
Location : abbreviate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
negated conditional → KILLED

361

1.1
Location : abbreviate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : abbreviate
Killed by : none
Replaced integer addition with subtraction → SURVIVED

3.3
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer subtraction with addition → KILLED

4.4
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
negated conditional → KILLED

362

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer subtraction with addition → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

364

1.1
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer subtraction with addition → KILLED

2.2
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
Replaced integer subtraction with addition → KILLED

3.3
Location : abbreviate
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviate_StringStringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviate to ( if (x != null) null else throw new RuntimeException ) → KILLED

397

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

2.2
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

398

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviateMiddle to ( if (x != null) null else throw new RuntimeException ) → KILLED

401

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
changed conditional boundary → KILLED

2.2
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
changed conditional boundary → KILLED

3.3
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer addition with subtraction → KILLED

4.4
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

5.5
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

402

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviateMiddle to ( if (x != null) null else throw new RuntimeException ) → KILLED

405

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer subtraction with addition → KILLED

406

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer division with multiplication → KILLED

2.2
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer modulus with multiplication → KILLED

3.3
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer addition with subtraction → KILLED

407

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer division with multiplication → KILLED

2.2
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
Replaced integer subtraction with addition → KILLED

409

1.1
Location : abbreviateMiddle
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
mutated return of Object value for org/apache/commons/lang3/StringUtils::abbreviateMiddle to ( if (x != null) null else throw new RuntimeException ) → KILLED

426

1.1
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

2.2
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

3.3
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

427

1.1
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

429

1.1
Location : appendIfMissing
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

3.3
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

431

1.1
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

432

1.1
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

436

1.1
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

474

1.1
Location : appendIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

512

1.1
Location : appendIfMissingIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissingIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::appendIfMissingIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

538

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

2.2
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

539

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testCapitalize()
mutated return of Object value for org/apache/commons/lang3/StringUtils::capitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED

544

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

546

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testCapitalize()
mutated return of Object value for org/apache/commons/lang3/StringUtils::capitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED

551

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
Changed increment from 1 to -1 → KILLED

552

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
changed conditional boundary → KILLED

2.2
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

554

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
Changed increment from 1 to -1 → KILLED

555

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
Replaced integer addition with subtraction → KILLED

557

1.1
Location : capitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
mutated return of Object value for org/apache/commons/lang3/StringUtils::capitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED

586

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

614

1.1
Location : center
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
negated conditional → KILLED

3.3
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
negated conditional → KILLED

615

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

618

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
Replaced integer subtraction with addition → KILLED

619

1.1
Location : center
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
negated conditional → KILLED

620

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

622

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
Replaced integer division with multiplication → KILLED

2.2
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
Replaced integer addition with subtraction → KILLED

624

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

654

1.1
Location : center
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
negated conditional → KILLED

3.3
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
negated conditional → KILLED

655

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

657

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
negated conditional → KILLED

661

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
Replaced integer subtraction with addition → KILLED

662

1.1
Location : center
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
negated conditional → KILLED

663

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

665

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
Replaced integer division with multiplication → KILLED

2.2
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
Replaced integer addition with subtraction → KILLED

667

1.1
Location : center
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::center to ( if (x != null) null else throw new RuntimeException ) → KILLED

698

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

699

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED

702

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

704

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

2.2
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

705

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED

707

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED

710

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
Replaced integer subtraction with addition → KILLED

713

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

714

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
Replaced integer subtraction with addition → KILLED

2.2
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

715

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
Changed increment from -1 to 1 → KILLED

717

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
negated conditional → KILLED

718

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
Changed increment from 1 to -1 → KILLED

720

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED

752

1.1
Location : chomp
Killed by : org.apache.commons.lang3.StringUtilsTest.testChomp()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chomp to ( if (x != null) null else throw new RuntimeException ) → KILLED

781

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
negated conditional → KILLED

782

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED

785

1.1
Location : chop
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
negated conditional → KILLED

786

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED

788

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
Replaced integer subtraction with addition → KILLED

791

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
Replaced integer subtraction with addition → KILLED

2.2
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
negated conditional → KILLED

3.3
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
negated conditional → KILLED

792

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
Replaced integer subtraction with addition → KILLED

2.2
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED

794

1.1
Location : chop
Killed by : org.apache.commons.lang3.StringUtilsTest.testChop()
mutated return of Object value for org/apache/commons/lang3/StringUtils::chop to ( if (x != null) null else throw new RuntimeException ) → KILLED

832

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

870

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
negated conditional → KILLED

871

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

873

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
negated conditional → KILLED

874

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
negated conditional → KILLED

2.2
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

876

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
negated conditional → KILLED

877

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
negated conditional → KILLED

2.2
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

879

1.1
Location : compare
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompare_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

920

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

963

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
negated conditional → KILLED

964

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

966

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
negated conditional → KILLED

967

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
negated conditional → KILLED

2.2
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

969

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
negated conditional → KILLED

970

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
negated conditional → KILLED

2.2
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

972

1.1
Location : compareIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testCompareIgnoreCase_StringStringBoolean()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

998

1.1
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_StringWithBadSupplementaryChars()
negated conditional → KILLED

2.2
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_StringWithBadSupplementaryChars()
negated conditional → KILLED

999

1.1
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_Char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1001

1.1
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_StringWithBadSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_StringWithBadSupplementaryChars()
negated conditional → KILLED

3.3
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_StringWithBadSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1027

1.1
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_Char()
negated conditional → KILLED

1028

1.1
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_Char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1030

1.1
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_Char()
changed conditional boundary → KILLED

2.2
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_Char()
negated conditional → KILLED

3.3
Location : contains
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContains_Char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1061

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
negated conditional → KILLED

2.2
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
negated conditional → KILLED

1062

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1066

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
Replaced integer subtraction with addition → KILLED

1067

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
Replaced integer subtraction with addition → KILLED

1068

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
changed conditional boundary → KILLED

2.2
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
negated conditional → KILLED

1070

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
changed conditional boundary → KILLED

2.2
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
negated conditional → KILLED

1071

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
negated conditional → KILLED

1072

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1073

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1075

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1077

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

3.3
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

4.4
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithBadSupplementaryChars()
negated conditional → KILLED

5.5
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

1078

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArrayWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1082

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1087

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringCharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1122

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringWithBadSupplementaryChars()
negated conditional → KILLED

1123

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1125

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringWithBadSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1154

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringStringArray()
negated conditional → KILLED

2.2
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringStringArray()
negated conditional → KILLED

1155

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1158

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringStringArray()
negated conditional → KILLED

1159

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1162

1.1
Location : containsAny
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1190

1.1
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
negated conditional → KILLED

2.2
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
negated conditional → KILLED

1191

1.1
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1194

1.1
Location : containsIgnoreCase
Killed by : none
Replaced integer subtraction with addition → SURVIVED

1195

1.1
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
changed conditional boundary → KILLED

2.2
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
negated conditional → KILLED

1196

1.1
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
negated conditional → KILLED

1197

1.1
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1200

1.1
Location : containsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsIgnoreCase_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1229

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

2.2
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1230

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1233

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
Replaced integer subtraction with addition → KILLED

1235

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
Replaced integer subtraction with addition → KILLED

1236

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsTest.testEscapeSurrogatePairs()
changed conditional boundary → KILLED

2.2
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsTest.testEscapeSurrogatePairs()
Changed increment from 1 to -1 → KILLED

3.3
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1238

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsTest.testEscapeSurrogatePairs()
changed conditional boundary → KILLED

2.2
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsTest.testEscapeSurrogatePairs()
Changed increment from 1 to -1 → KILLED

3.3
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1239

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsTest.testEscapeSurrogatePairs()
negated conditional → KILLED

1240

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1241

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

1243

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1245

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

3.3
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

4.4
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithBadSupplementaryChars()
negated conditional → KILLED

5.5
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithSupplementaryChars()
negated conditional → KILLED

1246

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArrayWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1250

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_CharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1255

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsTest.testEscapeSurrogatePairs()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1282

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_StringWithBadSupplementaryChars()
negated conditional → KILLED

2.2
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_StringWithBadSupplementaryChars()
negated conditional → KILLED

1283

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1285

1.1
Location : containsNone
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsNone_StringWithBadSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1314

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

2.2
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

1315

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_CharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1317

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
negated conditional → KILLED

1318

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1320

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

1321

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1323

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

2.2
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1350

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
negated conditional → KILLED

2.2
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
negated conditional → KILLED

1351

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1353

1.1
Location : containsOnly
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsOnly_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1368

1.1
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
negated conditional → KILLED

1369

1.1
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1372

1.1
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
changed conditional boundary → KILLED

2.2
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
Changed increment from 1 to -1 → KILLED

3.3
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
negated conditional → KILLED

1373

1.1
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
negated conditional → KILLED

1374

1.1
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1377

1.1
Location : containsWhitespace
Killed by : org.apache.commons.lang3.StringUtilsContainsTest.testContainsWhitespace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1381

1.1
Location : convertRemainingAccentCharacters
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
changed conditional boundary → KILLED

2.2
Location : convertRemainingAccentCharacters
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
negated conditional → KILLED

1382

1.1
Location : convertRemainingAccentCharacters
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
negated conditional → KILLED

1385

1.1
Location : convertRemainingAccentCharacters
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
negated conditional → KILLED

1412

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
negated conditional → KILLED

1413

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1417

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
changed conditional boundary → KILLED

2.2
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
negated conditional → KILLED

1418

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
negated conditional → KILLED

1419

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
Changed increment from 1 to -1 → KILLED

1422

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1448

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_String()
negated conditional → KILLED

2.2
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_String()
negated conditional → KILLED

1449

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1453

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_String()
negated conditional → KILLED

1454

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_String()
Changed increment from 1 to -1 → KILLED

1455

1.1
Location : countMatches
Killed by : none
Replaced integer addition with subtraction → TIMED_OUT

1457

1.1
Location : countMatches
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testCountMatches_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1481

1.1
Location : defaultIfBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
negated conditional → KILLED

2.2
Location : defaultIfBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultIfBlank to ( if (x != null) null else throw new RuntimeException ) → KILLED

1504

1.1
Location : defaultIfEmpty
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfEmpty_CharBuffers()
negated conditional → KILLED

2.2
Location : defaultIfEmpty
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfEmpty_CharBuffers()
mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultIfEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED

1526

1.1
Location : defaultString
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefault_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultString to ( if (x != null) null else throw new RuntimeException ) → KILLED

1547

1.1
Location : defaultString
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefault_String()
negated conditional → KILLED

2.2
Location : defaultString
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefault_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::defaultString to ( if (x != null) null else throw new RuntimeException ) → KILLED

1567

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
negated conditional → KILLED

1568

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::deleteWhitespace to ( if (x != null) null else throw new RuntimeException ) → KILLED

1573

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
changed conditional boundary → KILLED

2.2
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
Changed increment from 1 to -1 → KILLED

3.3
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
negated conditional → KILLED

1574

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
negated conditional → KILLED

1575

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
Changed increment from 1 to -1 → KILLED

1578

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
negated conditional → KILLED

1579

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::deleteWhitespace to ( if (x != null) null else throw new RuntimeException ) → KILLED

1581

1.1
Location : deleteWhitespace
Killed by : org.apache.commons.lang3.StringUtilsTest.testDeleteWhitespace_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::deleteWhitespace to ( if (x != null) null else throw new RuntimeException ) → KILLED

1615

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
negated conditional → KILLED

1616

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED

1618

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
negated conditional → KILLED

1619

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED

1622

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
negated conditional → KILLED

1623

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED

1625

1.1
Location : difference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifference_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::difference to ( if (x != null) null else throw new RuntimeException ) → KILLED

1653

1.1
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1668

1.1
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
negated conditional → KILLED

2.2
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
negated conditional → KILLED

1669

1.1
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
negated conditional → KILLED

2.2
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1671

1.1
Location : endsWith
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
negated conditional → KILLED

1672

1.1
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testAppendIfMissing()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1674

1.1
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
Replaced integer subtraction with addition → KILLED

1675

1.1
Location : endsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1700

1.1
Location : endsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testEndsWithAny()
negated conditional → KILLED

2.2
Location : endsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testEndsWithAny()
negated conditional → KILLED

1701

1.1
Location : endsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testEndsWithAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1704

1.1
Location : endsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testEndsWithAny()
negated conditional → KILLED

1705

1.1
Location : endsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testEndsWithAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1708

1.1
Location : endsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testEndsWithAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1735

1.1
Location : endsWithIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1763

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

1764

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1766

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

2.2
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

1767

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1769

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

1770

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1772

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

2.2
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAny()
negated conditional → KILLED

1773

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsOnStrings()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1777

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
changed conditional boundary → KILLED

2.2
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
Changed increment from 1 to -1 → KILLED

3.3
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

1778

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
negated conditional → KILLED

1779

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1782

1.1
Location : equals
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEquals()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1805

1.1
Location : equalsAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAny()
negated conditional → KILLED

1807

1.1
Location : equalsAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAny()
negated conditional → KILLED

1808

1.1
Location : equalsAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1812

1.1
Location : equalsAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1835

1.1
Location : equalsAnyIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAnyIgnoreCase()
negated conditional → KILLED

1837

1.1
Location : equalsAnyIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAnyIgnoreCase()
negated conditional → KILLED

1838

1.1
Location : equalsAnyIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAnyIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1842

1.1
Location : equalsAnyIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsAnyIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1867

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
negated conditional → KILLED

1868

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1870

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
negated conditional → KILLED

2.2
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
negated conditional → KILLED

1871

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1873

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
negated conditional → KILLED

1874

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1876

1.1
Location : equalsIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testEqualsIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

1906

1.1
Location : firstNonBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonBlank()
negated conditional → KILLED

1908

1.1
Location : firstNonBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonBlank()
negated conditional → KILLED

1909

1.1
Location : firstNonBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonBlank()
mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonBlank to ( if (x != null) null else throw new RuntimeException ) → KILLED

1913

1.1
Location : firstNonBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonBlank()
mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonBlank to ( if (x != null) null else throw new RuntimeException ) → KILLED

1941

1.1
Location : firstNonEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonEmpty()
negated conditional → KILLED

1943

1.1
Location : firstNonEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonEmpty()
negated conditional → KILLED

1944

1.1
Location : firstNonEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonEmpty()
mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED

1948

1.1
Location : firstNonEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonEmpty()
mutated return of Object value for org/apache/commons/lang3/StringUtils::firstNonEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED

1961

1.1
Location : getBytes
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetBytes_Charset()
negated conditional → KILLED

2.2
Location : getBytes
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetBytes_Charset()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getBytes to ( if (x != null) null else throw new RuntimeException ) → KILLED

1975

1.1
Location : getBytes
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetBytes_String()
negated conditional → KILLED

2.2
Location : getBytes
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetBytes_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getBytes to ( if (x != null) null else throw new RuntimeException ) → KILLED

2012

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
negated conditional → KILLED

2.2
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
negated conditional → KILLED

2013

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED

2016

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
negated conditional → KILLED

2018

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
negated conditional → KILLED

2019

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED

2021

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED

2022

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
negated conditional → KILLED

2024

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED

2027

1.1
Location : getCommonPrefix
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetCommonPrefix_StringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getCommonPrefix to ( if (x != null) null else throw new RuntimeException ) → KILLED

2054

1.1
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
negated conditional → KILLED

2055

1.1
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getDigits to ( if (x != null) null else throw new RuntimeException ) → KILLED

2059

1.1
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
changed conditional boundary → KILLED

2.2
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
Changed increment from 1 to -1 → KILLED

3.3
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
negated conditional → KILLED

2061

1.1
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
negated conditional → KILLED

2065

1.1
Location : getDigits
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
mutated return of Object value for org/apache/commons/lang3/StringUtils::getDigits to ( if (x != null) null else throw new RuntimeException ) → KILLED

2099

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

2.2
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance_StringNullLoclae()
negated conditional → KILLED

2101

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

2122

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
changed conditional boundary → KILLED

2.2
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
Changed increment from 1 to -1 → KILLED

3.3
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

2126

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
changed conditional boundary → KILLED

2.2
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
Changed increment from 1 to -1 → KILLED

3.3
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

4.4
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

2129

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

2131

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
Changed increment from 1 to -1 → KILLED

2135

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
Replaced integer addition with subtraction → KILLED

2.2
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
negated conditional → KILLED

2136

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
Changed increment from 2 to -2 → KILLED

2148

1.1
Location : getFuzzyDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetFuzzyDistance()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2190

1.1
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_NullString()
negated conditional → KILLED

2.2
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringNull()
negated conditional → KILLED

2196

1.1
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

2197

1.1
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
replaced return of double value with -(x + 1) for org/apache/commons/lang3/StringUtils::getJaroWinklerDistance → KILLED

2199

1.1
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double division with multiplication → KILLED

2.2
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double division with multiplication → KILLED

3.3
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double addition with subtraction → KILLED

4.4
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double subtraction with addition → KILLED

5.5
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double division with multiplication → KILLED

6.6
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double addition with subtraction → KILLED

7.7
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double division with multiplication → KILLED

2200

1.1
Location : getJaroWinklerDistance
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double division with multiplication → KILLED

3.3
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double multiplication with division → KILLED

4.4
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double subtraction with addition → KILLED

5.5
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double multiplication with division → KILLED

6.6
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double addition with subtraction → KILLED

7.7
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

2201

1.1
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double multiplication with division → KILLED

2.2
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced double division with multiplication → KILLED

3.3
Location : getJaroWinklerDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
replaced return of double value with -(x + 1) for org/apache/commons/lang3/StringUtils::getJaroWinklerDistance → KILLED

2243

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringNull()
negated conditional → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_NullString()
negated conditional → KILLED

2250

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
negated conditional → KILLED

2251

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2252

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
negated conditional → KILLED

2253

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2256

1.1
Location : getLevenshteinDistance
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : getLevenshteinDistance
Killed by : none
negated conditional → SURVIVED

2265

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer addition with subtraction → KILLED

2275

1.1
Location : getLevenshteinDistance
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : getLevenshteinDistance
Killed by : none
negated conditional → SURVIVED

2279

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
negated conditional → KILLED

2281

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer subtraction with addition → KILLED

2284

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
negated conditional → KILLED

2286

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer subtraction with addition → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
negated conditional → KILLED

2288

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer subtraction with addition → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer addition with subtraction → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer addition with subtraction → KILLED

4.4
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
Replaced integer addition with subtraction → KILLED

2293

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2333

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_NullStringInt()
negated conditional → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringNullInt()
negated conditional → KILLED

2336

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringNegativeInt()
negated conditional → KILLED

2388

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2389

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2390

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2391

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2392

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2394

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2397

1.1
Location : getLevenshteinDistance
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : getLevenshteinDistance
Killed by : none
negated conditional → SURVIVED

2406

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer addition with subtraction → KILLED

2407

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer addition with subtraction → KILLED

2411

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer addition with subtraction → KILLED

2412

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Changed increment from 1 to -1 → KILLED

3.3
Location : getLevenshteinDistance
Killed by : none
negated conditional → SURVIVED

2417

1.1
Location : getLevenshteinDistance
Killed by : none
removed call to java/util/Arrays::fill → SURVIVED

2418

1.1
Location : getLevenshteinDistance
Killed by : none
removed call to java/util/Arrays::fill → SURVIVED

2421

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Changed increment from 1 to -1 → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2422

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

2426

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

2427

1.1
Location : getLevenshteinDistance
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : getLevenshteinDistance
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer addition with subtraction → KILLED

4.4
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2430

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2431

1.1
Location : getLevenshteinDistance
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

2435

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2436

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

2440

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Changed increment from 1 to -1 → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2441

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2443

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

2446

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer subtraction with addition → KILLED

3.3
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
Replaced integer addition with subtraction → KILLED

2458

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
negated conditional → KILLED

2459

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2461

1.1
Location : getLevenshteinDistance
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetLevenshteinDistance_StringStringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2489

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_String()
negated conditional → KILLED

2.2
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_String()
negated conditional → KILLED

2490

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2492

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2529

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_StringInt()
negated conditional → KILLED

2.2
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_StringInt()
negated conditional → KILLED

2530

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2532

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2575

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_char()
negated conditional → KILLED

2576

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2578

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2635

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_charInt()
negated conditional → KILLED

2636

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_charInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2638

1.1
Location : indexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOf_charInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2667

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2668

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringCharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2671

1.1
Location : indexOfAny
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2673

1.1
Location : indexOfAny
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2674

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2676

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2677

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2678

1.1
Location : indexOfAny
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfAny
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

4.4
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

5.5
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2680

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

3.3
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2681

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2684

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringCharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2689

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2722

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
negated conditional → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
negated conditional → KILLED

2723

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2731

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
negated conditional → KILLED

2735

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
negated conditional → KILLED

2739

1.1
Location : indexOfAny
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
negated conditional → KILLED

2744

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
negated conditional → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2771

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2.2
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
negated conditional → KILLED

2772

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2774

1.1
Location : indexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAny_StringStringWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2804

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

2805

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2808

1.1
Location : indexOfAnyBut
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2810

1.1
Location : indexOfAnyBut
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2812

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
changed conditional boundary → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

2814

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

2815

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

2816

1.1
Location : indexOfAnyBut
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfAnyBut
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

4.4
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

5.5
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

2817

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
negated conditional → KILLED

2825

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringCharArrayWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2827

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2854

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2855

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2858

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2860

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
changed conditional boundary → KILLED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2861

1.1
Location : indexOfAnyBut
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfAnyBut
Killed by : none
Replaced integer addition with subtraction → SURVIVED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

4.4
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2862

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
Replaced integer addition with subtraction → KILLED

2863

1.1
Location : indexOfAnyBut
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

3.3
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2864

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2867

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
negated conditional → KILLED

2868

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2872

1.1
Location : indexOfAnyBut
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfAnyBut_StringStringWithSupplementaryChars()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2908

1.1
Location : indexOfDifference
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

3.3
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2909

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2921

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2932

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

3.3
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2933

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2937

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2938

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2943

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
changed conditional boundary → KILLED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2945

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
changed conditional boundary → KILLED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2946

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2951

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2956

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
negated conditional → KILLED

2960

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2962

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2991

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

2992

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2994

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

2995

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

2998

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
changed conditional boundary → KILLED

2.2
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
changed conditional boundary → KILLED

3.3
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
Changed increment from 1 to -1 → KILLED

4.4
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

5.5
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

2999

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

3003

1.1
Location : indexOfDifference
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfDifference
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

4.4
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
negated conditional → KILLED

3004

1.1
Location : indexOfDifference
Killed by : org.apache.commons.lang3.StringUtilsTest.testDifferenceAt_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3006

1.1
Location : indexOfDifference
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

3035

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3071

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

2.2
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

3072

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3074

1.1
Location : indexOfIgnoreCase
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

3077

1.1
Location : indexOfIgnoreCase
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2.2
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
Replaced integer addition with subtraction → KILLED

3078

1.1
Location : indexOfIgnoreCase
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

3079

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3081

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

3082

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3084

1.1
Location : indexOfIgnoreCase
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : indexOfIgnoreCase
Killed by : none
Changed increment from 1 to -1 → TIMED_OUT

3.3
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

3085

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

3086

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3089

1.1
Location : indexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3114

1.1
Location : isAllBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllBlank()
negated conditional → KILLED

3115

1.1
Location : isAllBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3118

1.1
Location : isAllBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllBlank()
negated conditional → KILLED

3119

1.1
Location : isAllBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3122

1.1
Location : isAllBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3145

1.1
Location : isAllEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllEmpty()
negated conditional → KILLED

3146

1.1
Location : isAllEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3149

1.1
Location : isAllEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllEmpty()
negated conditional → KILLED

3150

1.1
Location : isAllEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3153

1.1
Location : isAllEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAllEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3179

1.1
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
negated conditional → KILLED

2.2
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
negated conditional → KILLED

3180

1.1
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3183

1.1
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
changed conditional boundary → KILLED

2.2
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
negated conditional → KILLED

3184

1.1
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
negated conditional → KILLED

3185

1.1
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3188

1.1
Location : isAllLowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllLowerCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3214

1.1
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
negated conditional → KILLED

2.2
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
negated conditional → KILLED

3215

1.1
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3218

1.1
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
changed conditional boundary → KILLED

2.2
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
negated conditional → KILLED

3219

1.1
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
negated conditional → KILLED

3220

1.1
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3223

1.1
Location : isAllUpperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsAllUpperCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3249

1.1
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
negated conditional → KILLED

3250

1.1
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3253

1.1
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
changed conditional boundary → KILLED

2.2
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
negated conditional → KILLED

3254

1.1
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
negated conditional → KILLED

3255

1.1
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3258

1.1
Location : isAlpha
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlpha()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3284

1.1
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
negated conditional → KILLED

3285

1.1
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3288

1.1
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
changed conditional boundary → KILLED

2.2
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
negated conditional → KILLED

3289

1.1
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
negated conditional → KILLED

3290

1.1
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3293

1.1
Location : isAlphanumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumeric()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3319

1.1
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
negated conditional → KILLED

3320

1.1
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3323

1.1
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
changed conditional boundary → KILLED

2.2
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
negated conditional → KILLED

3324

1.1
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
negated conditional → KILLED

2.2
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
negated conditional → KILLED

3325

1.1
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3328

1.1
Location : isAlphanumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphanumericSpace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3354

1.1
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
negated conditional → KILLED

3355

1.1
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3358

1.1
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
changed conditional boundary → KILLED

2.2
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
negated conditional → KILLED

3359

1.1
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
negated conditional → KILLED

2.2
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
negated conditional → KILLED

3360

1.1
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3363

1.1
Location : isAlphaSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAlphaspace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3390

1.1
Location : isAnyBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyBlank()
negated conditional → KILLED

3391

1.1
Location : isAnyBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3394

1.1
Location : isAnyBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyBlank()
negated conditional → KILLED

3395

1.1
Location : isAnyBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3398

1.1
Location : isAnyBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3422

1.1
Location : isAnyEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyEmpty()
negated conditional → KILLED

3423

1.1
Location : isAnyEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3426

1.1
Location : isAnyEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyEmpty()
negated conditional → KILLED

3427

1.1
Location : isAnyEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3430

1.1
Location : isAnyEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsAnyEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3460

1.1
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
negated conditional → KILLED

3461

1.1
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3464

1.1
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
changed conditional boundary → KILLED

2.2
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
Changed increment from 1 to -1 → KILLED

3.3
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
negated conditional → KILLED

3465

1.1
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
negated conditional → KILLED

3466

1.1
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3469

1.1
Location : isAsciiPrintable
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsAsciiPrintable_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3495

1.1
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
negated conditional → KILLED

2.2
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
negated conditional → KILLED

3496

1.1
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3498

1.1
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
changed conditional boundary → KILLED

2.2
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
Changed increment from 1 to -1 → KILLED

3.3
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
negated conditional → KILLED

3499

1.1
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
negated conditional → KILLED

3500

1.1
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3503

1.1
Location : isBlank
Killed by : org.apache.commons.lang3.StringUtilsTest.testDefaultIfBlank_CharBuffers()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3528

1.1
Location : isEmpty
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
negated conditional → KILLED

2.2
Location : isEmpty
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
negated conditional → KILLED

3.3
Location : isEmpty
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetDigits()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3554

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

2.2
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

3555

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3560

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
changed conditional boundary → KILLED

2.2
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
Changed increment from 1 to -1 → KILLED

3.3
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

3561

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

2.2
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

3562

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3563

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

3565

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

3569

1.1
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

2.2
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
negated conditional → KILLED

3.3
Location : isMixedCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testIsMixedCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3596

1.1
Location : isNoneBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsNoneBlank()
negated conditional → KILLED

2.2
Location : isNoneBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsNoneBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3620

1.1
Location : isNoneEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsNoneEmpty()
negated conditional → KILLED

2.2
Location : isNoneEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsNoneEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3643

1.1
Location : isNotBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsNotBlank()
negated conditional → KILLED

2.2
Location : isNotBlank
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testIsNotBlank()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3662

1.1
Location : isNotEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonEmpty()
negated conditional → KILLED

2.2
Location : isNotEmpty
Killed by : org.apache.commons.lang3.StringUtilsEmptyBlankTest.testFirstNonEmpty()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3697

1.1
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
negated conditional → KILLED

3698

1.1
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3701

1.1
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
changed conditional boundary → KILLED

2.2
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
Changed increment from 1 to -1 → KILLED

3.3
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
negated conditional → KILLED

3702

1.1
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
negated conditional → KILLED

3703

1.1
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3706

1.1
Location : isNumeric
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumeric()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3736

1.1
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
negated conditional → KILLED

3737

1.1
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3740

1.1
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
changed conditional boundary → KILLED

2.2
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
Changed increment from 1 to -1 → KILLED

3.3
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
negated conditional → KILLED

3741

1.1
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
negated conditional → KILLED

2.2
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
negated conditional → KILLED

3742

1.1
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3745

1.1
Location : isNumericSpace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsNumericSpace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3771

1.1
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
negated conditional → KILLED

3772

1.1
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3775

1.1
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
changed conditional boundary → KILLED

2.2
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
Changed increment from 1 to -1 → KILLED

3.3
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
negated conditional → KILLED

3776

1.1
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
negated conditional → KILLED

3777

1.1
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3780

1.1
Location : isWhitespace
Killed by : org.apache.commons.lang3.StringUtilsIsTest.testIsWhitespace()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

3809

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
negated conditional → KILLED

3810

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3812

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3847

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
negated conditional → KILLED

3848

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3850

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3851

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
negated conditional → KILLED

3852

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3855

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
negated conditional → KILLED

3856

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
negated conditional → KILLED

3861

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfBytes()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3890

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
negated conditional → KILLED

3891

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3893

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3928

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
negated conditional → KILLED

3929

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3931

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3932

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
negated conditional → KILLED

3933

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3936

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
negated conditional → KILLED

3937

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
negated conditional → KILLED

3942

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfChars()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3971

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
negated conditional → KILLED

3972

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

3974

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4009

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
negated conditional → KILLED

4010

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4012

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4013

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
negated conditional → KILLED

4014

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4017

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
negated conditional → KILLED

4018

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
negated conditional → KILLED

4023

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfDoubles()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4052

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
negated conditional → KILLED

4053

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4055

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4090

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
negated conditional → KILLED

4091

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4093

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4094

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
negated conditional → KILLED

4095

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4098

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
negated conditional → KILLED

4099

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
negated conditional → KILLED

4104

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfFloats()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4133

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
negated conditional → KILLED

4134

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4136

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4171

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
negated conditional → KILLED

4172

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4174

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4175

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
negated conditional → KILLED

4176

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4179

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
negated conditional → KILLED

4180

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
negated conditional → KILLED

4185

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfInts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4203

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableChar()
negated conditional → KILLED

4204

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4206

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4224

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4225

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4227

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4247

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
negated conditional → KILLED

4248

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4250

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
negated conditional → KILLED

4251

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4254

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
negated conditional → KILLED

4255

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4260

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
negated conditional → KILLED

4264

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
negated conditional → KILLED

4267

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
negated conditional → KILLED

4272

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4291

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4292

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IteratorString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4294

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4295

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4298

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4299

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4304

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4308

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4309

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4313

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
negated conditional → KILLED

4317

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_IterableString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4347

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
negated conditional → KILLED

4348

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4350

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
Replaced integer subtraction with addition → KILLED

4351

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
negated conditional → KILLED

4352

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4355

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4385

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
negated conditional → KILLED

4386

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4388

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
Replaced integer subtraction with addition → KILLED

4389

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
negated conditional → KILLED

4390

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4393

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_List()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4422

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
negated conditional → KILLED

4423

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4425

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4461

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
negated conditional → KILLED

4462

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4464

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4465

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
negated conditional → KILLED

4466

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4469

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
negated conditional → KILLED

4470

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
negated conditional → KILLED

4475

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfLongs()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4501

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
negated conditional → KILLED

4502

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4504

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4534

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
negated conditional → KILLED

4535

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4537

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4538

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
negated conditional → KILLED

4539

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4542

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
negated conditional → KILLED

4543

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
negated conditional → KILLED

4546

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
negated conditional → KILLED

4550

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4577

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4578

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4580

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4619

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4620

1.1
Location : join
Killed by : none
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

4622

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4628

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4629

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4630

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4635

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4636

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4639

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
negated conditional → KILLED

4643

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4672

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
negated conditional → KILLED

4673

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4675

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4710

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
negated conditional → KILLED

4711

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4713

1.1
Location : join
Killed by : none
Replaced integer subtraction with addition → SURVIVED

4714

1.1
Location : join
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
negated conditional → KILLED

4715

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4718

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
Changed increment from 1 to -1 → KILLED

3.3
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
negated conditional → KILLED

4719

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
changed conditional boundary → KILLED

2.2
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
negated conditional → KILLED

4724

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayOfShorts()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4753

1.1
Location : join
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_Objects()
mutated return of Object value for org/apache/commons/lang3/StringUtils::join to ( if (x != null) null else throw new RuntimeException ) → KILLED

4778

1.1
Location : joinWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoinWithThrowsException()
negated conditional → KILLED

4787

1.1
Location : joinWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoinWith()
negated conditional → KILLED

4791

1.1
Location : joinWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoinWith()
negated conditional → KILLED

4796

1.1
Location : joinWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoinWith()
mutated return of Object value for org/apache/commons/lang3/StringUtils::joinWith to ( if (x != null) null else throw new RuntimeException ) → KILLED

4823

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_String()
negated conditional → KILLED

2.2
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_String()
negated conditional → KILLED

4824

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4826

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4865

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_StringInt()
negated conditional → KILLED

2.2
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_StringInt()
negated conditional → KILLED

4866

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4868

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4908

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_char()
negated conditional → KILLED

4909

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4911

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_char()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4959

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_charInt()
negated conditional → KILLED

4960

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_charInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4962

1.1
Location : lastIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOf_charInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4992

1.1
Location : lastIndexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfAny_StringStringArray()
negated conditional → KILLED

2.2
Location : lastIndexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfAny_StringStringArray()
negated conditional → KILLED

4993

1.1
Location : lastIndexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

4998

1.1
Location : lastIndexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfAny_StringStringArray()
negated conditional → KILLED

5002

1.1
Location : lastIndexOfAny
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : lastIndexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfAny_StringStringArray()
negated conditional → KILLED

5006

1.1
Location : lastIndexOfAny
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfAny_StringStringArray()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5033

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_String()
negated conditional → KILLED

2.2
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_String()
negated conditional → KILLED

5034

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5036

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_String()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5072

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

2.2
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

5073

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5075

1.1
Location : lastIndexOfIgnoreCase
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : lastIndexOfIgnoreCase
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3.3
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

5076

1.1
Location : lastIndexOfIgnoreCase
Killed by : none
Replaced integer subtraction with addition → SURVIVED

5078

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
changed conditional boundary → KILLED

2.2
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

5079

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5081

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

5082

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5085

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
changed conditional boundary → KILLED

2.2
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
Changed increment from -1 to 1 → KILLED

3.3
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

5086

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
negated conditional → KILLED

5087

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5090

1.1
Location : lastIndexOfIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastIndexOfIgnoreCase_StringInt()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5128

1.1
Location : lastOrdinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastOrdinalIndexOf()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5154

1.1
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
negated conditional → KILLED

5155

1.1
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED

5157

1.1
Location : left
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
negated conditional → KILLED

5158

1.1
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED

5160

1.1
Location : left
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
negated conditional → KILLED

5161

1.1
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED

5163

1.1
Location : left
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testLeft_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::left to ( if (x != null) null else throw new RuntimeException ) → KILLED

5186

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5211

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
negated conditional → KILLED

5212

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5214

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
Replaced integer subtraction with addition → KILLED

5215

1.1
Location : leftPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
negated conditional → KILLED

5216

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5218

1.1
Location : leftPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
negated conditional → KILLED

5219

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5221

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5248

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5249

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5251

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5256

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
Replaced integer subtraction with addition → KILLED

5257

1.1
Location : leftPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5258

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5260

1.1
Location : leftPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
negated conditional → KILLED

3.3
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5261

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5264

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5265

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5266

1.1
Location : leftPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5267

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testCenter_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5271

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
changed conditional boundary → KILLED

2.2
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
Changed increment from 1 to -1 → KILLED

3.3
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
negated conditional → KILLED

5272

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
Replaced integer modulus with multiplication → KILLED

5274

1.1
Location : leftPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testLeftPad_StringIntChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::leftPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

5290

1.1
Location : length
Killed by : org.apache.commons.lang3.StringUtilsTest.testLengthStringBuffer()
negated conditional → KILLED

2.2
Location : length
Killed by : org.apache.commons.lang3.StringUtilsTest.testLengthStringBuffer()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5313

1.1
Location : lowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testLowerCase()
negated conditional → KILLED

5314

1.1
Location : lowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testLowerCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5316

1.1
Location : lowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testLowerCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5336

1.1
Location : lowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testLowerCase()
negated conditional → KILLED

5337

1.1
Location : lowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testLowerCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5339

1.1
Location : lowerCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testLowerCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::lowerCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5344

1.1
Location : matches
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5351

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced integer division with multiplication → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced integer subtraction with addition → KILLED

5353

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
removed call to java/util/Arrays::fill → KILLED

5356

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5358

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced integer subtraction with addition → KILLED

4.4
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced integer addition with subtraction → KILLED

5.5
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced integer addition with subtraction → KILLED

6.6
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5359

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5362

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

5369

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5370

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5372

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

5375

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5376

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5378

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

5382

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5383

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5384

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

5388

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
changed conditional boundary → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5389

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
negated conditional → KILLED

5390

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Changed increment from 1 to -1 → KILLED

5395

1.1
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
Replaced integer division with multiplication → KILLED

2.2
Location : matches
Killed by : org.apache.commons.lang3.StringUtilsTest.testGetJaroWinklerDistance_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::matches to ( if (x != null) null else throw new RuntimeException ) → KILLED

5424

1.1
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
negated conditional → KILLED

5425

1.1
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED

5427

1.1
Location : mid
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : mid
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
negated conditional → KILLED

4.4
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
negated conditional → KILLED

5428

1.1
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED

5430

1.1
Location : mid
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
negated conditional → KILLED

5433

1.1
Location : mid
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
Replaced integer addition with subtraction → KILLED

3.3
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
negated conditional → KILLED

5434

1.1
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED

5436

1.1
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
Replaced integer addition with subtraction → KILLED

2.2
Location : mid
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testMid_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::mid to ( if (x != null) null else throw new RuntimeException ) → KILLED

5440

1.1
Location : newStringBuilder
Killed by : none
Replaced integer multiplication with division → SURVIVED

2.2
Location : newStringBuilder
Killed by : org.apache.commons.lang3.StringUtilsTest.testJoin_ArrayCharSeparator()
mutated return of Object value for org/apache/commons/lang3/StringUtils::newStringBuilder to ( if (x != null) null else throw new RuntimeException ) → KILLED

5487

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

5488

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
mutated return of Object value for org/apache/commons/lang3/StringUtils::normalizeSpace to ( if (x != null) null else throw new RuntimeException ) → KILLED

5495

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
changed conditional boundary → KILLED

2.2
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
Changed increment from 1 to -1 → KILLED

3.3
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

5498

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

5499

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

2.2
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

5500

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
Changed increment from 1 to -1 → KILLED

5502

1.1
Location : normalizeSpace
Killed by : none
Changed increment from 1 to -1 → SURVIVED

5505

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
Changed increment from 1 to -1 → KILLED

2.2
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

5509

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

5510

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
mutated return of Object value for org/apache/commons/lang3/StringUtils::normalizeSpace to ( if (x != null) null else throw new RuntimeException ) → KILLED

5512

1.1
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
changed conditional boundary → KILLED

2.2
Location : normalizeSpace
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3.3
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
negated conditional → KILLED

4.4
Location : normalizeSpace
Killed by : org.apache.commons.lang3.StringUtilsTest.testNormalizeSpace()
mutated return of Object value for org/apache/commons/lang3/StringUtils::normalizeSpace to ( if (x != null) null else throw new RuntimeException ) → KILLED

5566

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5585

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testOrdinalIndexOf()
changed conditional boundary → KILLED

2.2
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

3.3
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

4.4
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

5586

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastOrdinalIndexOf()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5588

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

5589

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastOrdinalIndexOf()
negated conditional → KILLED

2.2
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastOrdinalIndexOf()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5594

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

5596

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

5597

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLastOrdinalIndexOf()
Replaced integer subtraction with addition → KILLED

5599

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
Replaced integer addition with subtraction → KILLED

5601

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
changed conditional boundary → KILLED

2.2
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

5602

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testOrdinalIndexOf()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5604

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
Changed increment from 1 to -1 → KILLED

5605

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
changed conditional boundary → KILLED

2.2
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
negated conditional → KILLED

5606

1.1
Location : ordinalIndexOf
Killed by : org.apache.commons.lang3.StringUtilsEqualsIndexOfTest.testLANG1241_1()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

5641

1.1
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5642

1.1
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::overlay to ( if (x != null) null else throw new RuntimeException ) → KILLED

5644

1.1
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5648

1.1
Location : overlay
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5651

1.1
Location : overlay
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5654

1.1
Location : overlay
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5657

1.1
Location : overlay
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5660

1.1
Location : overlay
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
negated conditional → KILLED

5665

1.1
Location : overlay
Killed by : org.apache.commons.lang3.StringUtilsTest.testOverlay_StringStringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::overlay to ( if (x != null) null else throw new RuntimeException ) → KILLED

5682

1.1
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

2.2
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

3.3
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

5683

1.1
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

5685

1.1
Location : prependIfMissing
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

3.3
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

5687

1.1
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

5688

1.1
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

5692

1.1
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

5730

1.1
Location : prependIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

5768

1.1
Location : prependIfMissingIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissingIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::prependIfMissingIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5791

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
negated conditional → KILLED

2.2
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
negated conditional → KILLED

5792

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED

5796

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
changed conditional boundary → KILLED

2.2
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
negated conditional → KILLED

5797

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
negated conditional → KILLED

5798

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
Changed increment from 1 to -1 → KILLED

5801

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_char()
mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED

5828

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_String()
negated conditional → KILLED

2.2
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_String()
negated conditional → KILLED

5829

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED

5831

1.1
Location : remove
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemove_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::remove to ( if (x != null) null else throw new RuntimeException ) → KILLED

5881

1.1
Location : removeAll
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveAll_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeAll to ( if (x != null) null else throw new RuntimeException ) → KILLED

5909

1.1
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
negated conditional → KILLED

2.2
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
negated conditional → KILLED

5910

1.1
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED

5912

1.1
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
negated conditional → KILLED

5913

1.1
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
Replaced integer subtraction with addition → KILLED

2.2
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED

5915

1.1
Location : removeEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEnd()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED

5945

1.1
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
negated conditional → KILLED

2.2
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
negated conditional → KILLED

5946

1.1
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEndIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5948

1.1
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
negated conditional → KILLED

5949

1.1
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
Replaced integer subtraction with addition → KILLED

2.2
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEndIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

5951

1.1
Location : removeEndIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveEndIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeEndIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6000

1.1
Location : removeFirst
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveFirst_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeFirst to ( if (x != null) null else throw new RuntimeException ) → KILLED

6037

1.1
Location : removeIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveIgnoreCase_String()
negated conditional → KILLED

2.2
Location : removeIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveIgnoreCase_String()
negated conditional → KILLED

6038

1.1
Location : removeIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveIgnoreCase_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6040

1.1
Location : removeIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveIgnoreCase_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6077

1.1
Location : removePattern
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemovePattern_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removePattern to ( if (x != null) null else throw new RuntimeException ) → KILLED

6107

1.1
Location : removeStart
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStart()
negated conditional → KILLED

2.2
Location : removeStart
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStart()
negated conditional → KILLED

6108

1.1
Location : removeStart
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStart()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStart to ( if (x != null) null else throw new RuntimeException ) → KILLED

6110

1.1
Location : removeStart
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStart()
negated conditional → KILLED

6111

1.1
Location : removeStart
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStart()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStart to ( if (x != null) null else throw new RuntimeException ) → KILLED

6113

1.1
Location : removeStart
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStart()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStart to ( if (x != null) null else throw new RuntimeException ) → KILLED

6142

1.1
Location : removeStartIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
negated conditional → KILLED

2.2
Location : removeStartIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
negated conditional → KILLED

6143

1.1
Location : removeStartIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStartIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6145

1.1
Location : removeStartIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
negated conditional → KILLED

6146

1.1
Location : removeStartIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStartIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6148

1.1
Location : removeStartIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::removeStartIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6174

1.1
Location : repeat
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
negated conditional → KILLED

6175

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6178

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
changed conditional boundary → KILLED

2.2
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
Changed increment from -1 to 1 → KILLED

3.3
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
Replaced integer subtraction with addition → KILLED

4.4
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
negated conditional → KILLED

6181

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_CharInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6207

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
negated conditional → KILLED

6208

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6210

1.1
Location : repeat
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

6211

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6214

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

2.2
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testAbbreviateMiddle()
negated conditional → KILLED

6215

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6217

1.1
Location : repeat
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
negated conditional → KILLED

3.3
Location : repeat
Killed by : none
negated conditional → SURVIVED

6218

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6221

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
Replaced integer multiplication with division → KILLED

6224

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6229

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
changed conditional boundary → KILLED

2.2
Location : repeat
Killed by : none
Changed increment from -1 to 1 → TIMED_OUT

3.3
Location : repeat
Killed by : none
Changed increment from -1 to 1 → TIMED_OUT

4.4
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
Replaced integer multiplication with division → KILLED

5.5
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
Replaced integer subtraction with addition → KILLED

6.6
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
negated conditional → KILLED

6231

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
Replaced integer addition with subtraction → KILLED

6233

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6236

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : repeat
Killed by : none
Changed increment from 1 to -1 → MEMORY_ERROR

3.3
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
negated conditional → KILLED

6239

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6264

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
negated conditional → KILLED

2.2
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
negated conditional → KILLED

6265

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6269

1.1
Location : repeat
Killed by : org.apache.commons.lang3.StringUtilsTest.testRepeat_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::repeat to ( if (x != null) null else throw new RuntimeException ) → KILLED

6299

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED

6331

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceOnce_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED

6366

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

2.2
Location : replace
Killed by : none
negated conditional → TIMED_OUT

3.3
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

4.4
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

6367

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED

6370

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

6376

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

6377

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED

6380

1.1
Location : replace
Killed by : none
Replaced integer subtraction with addition → SURVIVED

6381

1.1
Location : replace
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

6382

1.1
Location : replace
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : replace
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : replace
Killed by : none
Replaced integer multiplication with division → SURVIVED

4.4
Location : replace
Killed by : none
negated conditional → SURVIVED

5.5
Location : replace
Killed by : none
negated conditional → SURVIVED

6383

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringEscapeUtilsTest.testEscapeCsvWriter()
Replaced integer addition with subtraction → KILLED

6384

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

6386

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
Replaced integer addition with subtraction → KILLED

6387

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
Changed increment from -1 to 1 → KILLED

2.2
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
negated conditional → KILLED

6393

1.1
Location : replace
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replace to ( if (x != null) null else throw new RuntimeException ) → KILLED

6448

1.1
Location : replaceAll
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceAll_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceAll to ( if (x != null) null else throw new RuntimeException ) → KILLED

6474

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringCharChar()
negated conditional → KILLED

6475

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringCharChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED

6477

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringCharChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED

6517

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

2.2
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

6518

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED

6520

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

6527

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
changed conditional boundary → KILLED

2.2
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
Changed increment from 1 to -1 → KILLED

3.3
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

6530

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
changed conditional boundary → KILLED

2.2
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

6532

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
changed conditional boundary → KILLED

2.2
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

6539

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
negated conditional → KILLED

6540

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED

6542

1.1
Location : replaceChars
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceChars_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceChars to ( if (x != null) null else throw new RuntimeException ) → KILLED

6585

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED

6644

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

4.4
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

5.5
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6.6
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6646

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED

6650

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
changed conditional boundary → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6659

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6676

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
changed conditional boundary → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6677

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6678

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6684

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6687

1.1
Location : replaceEach
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6696

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6697

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED

6706

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
changed conditional boundary → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : replaceEach
Killed by : none
negated conditional → SURVIVED

6707

1.1
Location : replaceEach
Killed by : none
negated conditional → SURVIVED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6710

1.1
Location : replaceEach
Killed by : none
Replaced integer subtraction with addition → SURVIVED

6711

1.1
Location : replaceEach
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : replaceEach
Killed by : none
negated conditional → SURVIVED

6712

1.1
Location : replaceEach
Killed by : none
Replaced integer multiplication with division → SURVIVED

2.2
Location : replaceEach
Killed by : none
Replaced integer addition with subtraction → SURVIVED

6716

1.1
Location : replaceEach
Killed by : none
Replaced integer division with multiplication → SURVIVED

6718

1.1
Location : replaceEach
Killed by : none
Replaced integer addition with subtraction → SURVIVED

6720

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6722

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
changed conditional boundary → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6727

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
Replaced integer addition with subtraction → KILLED

6734

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
changed conditional boundary → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6735

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6736

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6742

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6745

1.1
Location : replaceEach
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6755

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
changed conditional boundary → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
Changed increment from 1 to -1 → KILLED

3.3
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6759

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
negated conditional → KILLED

6760

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArray()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED

6763

1.1
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArrayBoolean()
Replaced integer subtraction with addition → KILLED

2.2
Location : replaceEach
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArrayBoolean()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEach to ( if (x != null) null else throw new RuntimeException ) → KILLED

6811

1.1
Location : replaceEachRepeatedly
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArrayBoolean()
negated conditional → KILLED

6812

1.1
Location : replaceEachRepeatedly
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplace_StringStringArrayStringArrayBoolean()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceEachRepeatedly to ( if (x != null) null else throw new RuntimeException ) → KILLED

6865

1.1
Location : replaceFirst
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceFirst_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceFirst to ( if (x != null) null else throw new RuntimeException ) → KILLED

6893

1.1
Location : replaceIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6926

1.1
Location : replaceIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceIgnoreCase_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

6955

1.1
Location : replaceOnce
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceOnce_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceOnce to ( if (x != null) null else throw new RuntimeException ) → KILLED

6984

1.1
Location : replaceOnceIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplaceOnceIgnoreCase_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replaceOnceIgnoreCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

7030

1.1
Location : replacePattern
Killed by : org.apache.commons.lang3.StringUtilsTest.testReplacePattern_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::replacePattern to ( if (x != null) null else throw new RuntimeException ) → KILLED

7050

1.1
Location : reverse
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverse_String()
negated conditional → KILLED

7051

1.1
Location : reverse
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverse_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::reverse to ( if (x != null) null else throw new RuntimeException ) → KILLED

7053

1.1
Location : reverse
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverse_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::reverse to ( if (x != null) null else throw new RuntimeException ) → KILLED

7076

1.1
Location : reverseDelimited
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverseDelimited_StringChar()
negated conditional → KILLED

7077

1.1
Location : reverseDelimited
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverseDelimited_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::reverseDelimited to ( if (x != null) null else throw new RuntimeException ) → KILLED

7082

1.1
Location : reverseDelimited
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverseDelimited_StringChar()
removed call to org/apache/commons/lang3/ArrayUtils::reverse → KILLED

7083

1.1
Location : reverseDelimited
Killed by : org.apache.commons.lang3.StringUtilsTest.testReverseDelimited_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::reverseDelimited to ( if (x != null) null else throw new RuntimeException ) → KILLED

7107

1.1
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
negated conditional → KILLED

7108

1.1
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED

7110

1.1
Location : right
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
negated conditional → KILLED

7111

1.1
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED

7113

1.1
Location : right
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
negated conditional → KILLED

7114

1.1
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED

7116

1.1
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
Replaced integer subtraction with addition → KILLED

2.2
Location : right
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testRight_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::right to ( if (x != null) null else throw new RuntimeException ) → KILLED

7139

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7164

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
negated conditional → KILLED

7165

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7167

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
Replaced integer subtraction with addition → KILLED

7168

1.1
Location : rightPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
negated conditional → KILLED

7169

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7171

1.1
Location : rightPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
negated conditional → KILLED

7172

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7174

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7201

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

7202

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7204

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

7209

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
Replaced integer subtraction with addition → KILLED

7210

1.1
Location : rightPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

7211

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7213

1.1
Location : rightPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

3.3
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntChar()
negated conditional → KILLED

7214

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7217

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

7218

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7219

1.1
Location : rightPad
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

7220

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7224

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
changed conditional boundary → KILLED

2.2
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
Changed increment from 1 to -1 → KILLED

3.3
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
negated conditional → KILLED

7225

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
Replaced integer modulus with multiplication → KILLED

7227

1.1
Location : rightPad
Killed by : org.apache.commons.lang3.StringUtilsTest.testRightPad_StringIntString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rightPad to ( if (x != null) null else throw new RuntimeException ) → KILLED

7260

1.1
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

7261

1.1
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rotate to ( if (x != null) null else throw new RuntimeException ) → KILLED

7265

1.1
Location : rotate
Killed by : none
Replaced integer modulus with multiplication → SURVIVED

2.2
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

3.3
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

4.4
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

7266

1.1
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rotate to ( if (x != null) null else throw new RuntimeException ) → KILLED

7270

1.1
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
removed negation → KILLED

2.2
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
Replaced integer modulus with multiplication → KILLED

7273

1.1
Location : rotate
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::rotate to ( if (x != null) null else throw new RuntimeException ) → KILLED

7301

1.1
Location : split
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED

7329

1.1
Location : split
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED

7358

1.1
Location : split
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED

7392

1.1
Location : split
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::split to ( if (x != null) null else throw new RuntimeException ) → KILLED

7415

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED

7433

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
negated conditional → KILLED

7434

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED

7436

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
negated conditional → KILLED

7437

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED

7443

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
changed conditional boundary → KILLED

2.2
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
Changed increment from 1 to -1 → KILLED

3.3
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
Replaced integer addition with subtraction → KILLED

4.4
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
negated conditional → KILLED

7445

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
negated conditional → KILLED

7448

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
negated conditional → KILLED

2.2
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterTypeCamelCase()
negated conditional → KILLED

3.3
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterTypeCamelCase()
negated conditional → KILLED

7449

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterTypeCamelCase()
Replaced integer subtraction with addition → KILLED

7450

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterTypeCamelCase()
negated conditional → KILLED

7451

1.1
Location : splitByCharacterType
Killed by : none
Replaced integer subtraction with addition → SURVIVED

7455

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
Replaced integer subtraction with addition → KILLED

7460

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
Replaced integer subtraction with addition → KILLED

7461

1.1
Location : splitByCharacterType
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterType()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterType to ( if (x != null) null else throw new RuntimeException ) → KILLED

7489

1.1
Location : splitByCharacterTypeCamelCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByCharacterTypeCamelCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByCharacterTypeCamelCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

7516

1.1
Location : splitByWholeSeparator
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeString_StringStringBoolean()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparator to ( if (x != null) null else throw new RuntimeException ) → KILLED

7547

1.1
Location : splitByWholeSeparator
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeString_StringStringBooleanInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparator to ( if (x != null) null else throw new RuntimeException ) → KILLED

7576

1.1
Location : splitByWholeSeparatorPreserveAllTokens
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED

7609

1.1
Location : splitByWholeSeparatorPreserveAllTokens
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED

7628

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7629

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7634

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7635

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7638

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

2.2
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7640

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7649

1.1
Location : splitByWholeSeparatorWorker
Killed by : none
changed conditional boundary → TIMED_OUT

2.2
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7652

1.1
Location : splitByWholeSeparatorWorker
Killed by : none
changed conditional boundary → TIMED_OUT

2.2
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7653

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeString_StringStringBoolean()
changed conditional boundary → KILLED

2.2
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7654

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
Changed increment from 1 to -1 → KILLED

7656

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7667

1.1
Location : splitByWholeSeparatorWorker
Killed by : none
Replaced integer addition with subtraction → TIMED_OUT

7671

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7672

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
Changed increment from 1 to -1 → KILLED

7673

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
negated conditional → KILLED

7680

1.1
Location : splitByWholeSeparatorWorker
Killed by : none
Replaced integer addition with subtraction → TIMED_OUT

7689

1.1
Location : splitByWholeSeparatorWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeSeparatorPreserveAllTokens_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitByWholeSeparatorWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7718

1.1
Location : splitPreserveAllTokens
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED

7754

1.1
Location : splitPreserveAllTokens
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED

7791

1.1
Location : splitPreserveAllTokens
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_StringString_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED

7831

1.1
Location : splitPreserveAllTokens
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_StringString_StringStringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitPreserveAllTokens to ( if (x != null) null else throw new RuntimeException ) → KILLED

7849

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

7850

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7853

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

7854

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7860

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
changed conditional boundary → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

7861

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

7862

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

7867

1.1
Location : splitWorker
Killed by : none
Changed increment from 1 to -1 → TIMED_OUT

7872

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
Changed increment from 1 to -1 → KILLED

7874

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
negated conditional → KILLED

3.3
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_StringChar()
negated conditional → KILLED

7877

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7899

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7900

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7903

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7904

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

7911

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7913

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
changed conditional boundary → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7914

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7915

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitByWholeString_StringStringBoolean()
negated conditional → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7917

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
Changed increment from 1 to -1 → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7924

1.1
Location : splitWorker
Killed by : none
Changed increment from 1 to -1 → TIMED_OUT

7929

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
Changed increment from 1 to -1 → KILLED

7931

1.1
Location : splitWorker
Killed by : none
negated conditional → SURVIVED

7934

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7935

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7936

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7938

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
Changed increment from 1 to -1 → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7945

1.1
Location : splitWorker
Killed by : none
Changed increment from 1 to -1 → TIMED_OUT

7950

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
Changed increment from 1 to -1 → KILLED

7954

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7955

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
changed conditional boundary → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7956

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7958

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
Changed increment from 1 to -1 → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
negated conditional → KILLED

7965

1.1
Location : splitWorker
Killed by : none
Changed increment from 1 to -1 → TIMED_OUT

7970

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplit_StringString_StringStringInt()
Changed increment from 1 to -1 → KILLED

7973

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

2.2
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

3.3
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
negated conditional → KILLED

7976

1.1
Location : splitWorker
Killed by : org.apache.commons.lang3.StringUtilsTest.testSplitPreserveAllTokens_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::splitWorker to ( if (x != null) null else throw new RuntimeException ) → KILLED

8002

1.1
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8017

1.1
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
negated conditional → KILLED

2.2
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
negated conditional → KILLED

8018

1.1
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
negated conditional → KILLED

2.2
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8020

1.1
Location : startsWith
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
negated conditional → KILLED

8021

1.1
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testPrependIfMissing()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8023

1.1
Location : startsWith
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8049

1.1
Location : startsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testStartsWithAny()
negated conditional → KILLED

2.2
Location : startsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testStartsWithAny()
negated conditional → KILLED

8050

1.1
Location : startsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testStartsWithAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8053

1.1
Location : startsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testStartsWithAny()
negated conditional → KILLED

8054

1.1
Location : startsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testStartsWithAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8057

1.1
Location : startsWithAny
Killed by : org.apache.commons.lang3.StringUtilsStartsEndsWithTest.testStartsWithAny()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8083

1.1
Location : startsWithIgnoreCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testRemoveStartIgnoreCase()
replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED

8111

1.1
Location : strip
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStrip_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::strip to ( if (x != null) null else throw new RuntimeException ) → KILLED

8141

1.1
Location : strip
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToEmpty_String()
negated conditional → KILLED

8142

1.1
Location : strip
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToEmpty_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::strip to ( if (x != null) null else throw new RuntimeException ) → KILLED

8145

1.1
Location : strip
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToEmpty_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::strip to ( if (x != null) null else throw new RuntimeException ) → KILLED

8167

1.1
Location : stripAccents
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
negated conditional → KILLED

8168

1.1
Location : stripAccents
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAccents to ( if (x != null) null else throw new RuntimeException ) → KILLED

8172

1.1
Location : stripAccents
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
removed call to org/apache/commons/lang3/StringUtils::convertRemainingAccentCharacters → KILLED

8174

1.1
Location : stripAccents
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAccents()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAccents to ( if (x != null) null else throw new RuntimeException ) → KILLED

8199

1.1
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAll to ( if (x != null) null else throw new RuntimeException ) → KILLED

8229

1.1
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
negated conditional → KILLED

2.2
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
negated conditional → KILLED

8230

1.1
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAll to ( if (x != null) null else throw new RuntimeException ) → KILLED

8233

1.1
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
changed conditional boundary → KILLED

2.2
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
Changed increment from 1 to -1 → KILLED

3.3
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
negated conditional → KILLED

8236

1.1
Location : stripAll
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripAll()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripAll to ( if (x != null) null else throw new RuntimeException ) → KILLED

8266

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
negated conditional → KILLED

2.2
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
negated conditional → KILLED

8267

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripEnd_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED

8270

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
negated conditional → KILLED

8271

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripEnd_StringString()
Replaced integer subtraction with addition → KILLED

2.2
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripEnd_StringString()
negated conditional → KILLED

3.3
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripEnd_StringString()
negated conditional → KILLED

8272

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripEnd_StringString()
Changed increment from -1 to 1 → KILLED

8274

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
negated conditional → KILLED

8275

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripEnd_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED

8277

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
Replaced integer subtraction with addition → KILLED

2.2
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
negated conditional → KILLED

3.3
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
negated conditional → KILLED

8278

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
Changed increment from -1 to 1 → KILLED

8281

1.1
Location : stripEnd
Killed by : org.apache.commons.lang3.StringUtilsTest.testLANG666()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripEnd to ( if (x != null) null else throw new RuntimeException ) → KILLED

8310

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

2.2
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

8311

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripStart to ( if (x != null) null else throw new RuntimeException ) → KILLED

8314

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

8315

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

2.2
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

8316

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
Changed increment from 1 to -1 → KILLED

8318

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

8319

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripStart to ( if (x != null) null else throw new RuntimeException ) → KILLED

8321

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

2.2
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
negated conditional → KILLED

8322

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
Changed increment from 1 to -1 → KILLED

8325

1.1
Location : stripStart
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripStart_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripStart to ( if (x != null) null else throw new RuntimeException ) → KILLED

8351

1.1
Location : stripToEmpty
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToEmpty_String()
negated conditional → KILLED

2.2
Location : stripToEmpty
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToEmpty_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripToEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED

8378

1.1
Location : stripToNull
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToNull_String()
negated conditional → KILLED

8379

1.1
Location : stripToNull
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToNull_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripToNull to ( if (x != null) null else throw new RuntimeException ) → KILLED

8382

1.1
Location : stripToNull
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToNull_String()
negated conditional → KILLED

2.2
Location : stripToNull
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testStripToNull_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::stripToNull to ( if (x != null) null else throw new RuntimeException ) → KILLED

8412

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8413

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED

8417

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringInt()
changed conditional boundary → KILLED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8418

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
Replaced integer addition with subtraction → KILLED

8421

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8424

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8425

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED

8428

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED

8467

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8468

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED

8472

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8473

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
Replaced integer addition with subtraction → KILLED

8475

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
changed conditional boundary → KILLED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8476

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringIntInt()
Replaced integer addition with subtraction → KILLED

8480

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8485

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8486

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED

8489

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstring_StringIntInt()
negated conditional → KILLED

8492

1.1
Location : substring
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
negated conditional → KILLED

8496

1.1
Location : substring
Killed by : org.apache.commons.lang3.StringUtilsTest.testRotate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substring to ( if (x != null) null else throw new RuntimeException ) → KILLED

8528

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
negated conditional → KILLED

8529

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED

8531

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
negated conditional → KILLED

8532

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED

8535

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
negated conditional → KILLED

8536

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED

8538

1.1
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
Replaced integer addition with subtraction → KILLED

2.2
Location : substringAfter
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfter_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED

8571

1.1
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
negated conditional → KILLED

8572

1.1
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8574

1.1
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
negated conditional → KILLED

8575

1.1
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8578

1.1
Location : substringAfterLast
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2.2
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
negated conditional → KILLED

3.3
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
negated conditional → KILLED

8579

1.1
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8581

1.1
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
Replaced integer addition with subtraction → KILLED

2.2
Location : substringAfterLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringAfterLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringAfterLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8617

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
negated conditional → KILLED

2.2
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
negated conditional → KILLED

8618

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED

8620

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
negated conditional → KILLED

8621

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED

8624

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
negated conditional → KILLED

8625

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED

8627

1.1
Location : substringBefore
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBefore_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED

8658

1.1
Location : substringBeforeLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBeforeLast_StringString()
negated conditional → KILLED

2.2
Location : substringBeforeLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBeforeLast_StringString()
negated conditional → KILLED

8659

1.1
Location : substringBeforeLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBeforeLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBeforeLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8662

1.1
Location : substringBeforeLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBeforeLast_StringString()
negated conditional → KILLED

8663

1.1
Location : substringBeforeLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBeforeLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBeforeLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8665

1.1
Location : substringBeforeLast
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBeforeLast_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBeforeLast to ( if (x != null) null else throw new RuntimeException ) → KILLED

8692

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8723

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
negated conditional → KILLED

2.2
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
negated conditional → KILLED

3.3
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
negated conditional → KILLED

8724

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8727

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
negated conditional → KILLED

8728

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
Replaced integer addition with subtraction → KILLED

8729

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
negated conditional → KILLED

8730

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
Replaced integer addition with subtraction → KILLED

2.2
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8733

1.1
Location : substringBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8762

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

2.2
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

3.3
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

8763

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8766

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

8767

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8773

1.1
Location : substringsBetween
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substringsBetween
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3.3
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

8775

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
changed conditional boundary → KILLED

2.2
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

8778

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
Replaced integer addition with subtraction → KILLED

8780

1.1
Location : substringsBetween
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

8784

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
Replaced integer addition with subtraction → KILLED

8786

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
negated conditional → KILLED

8787

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8789

1.1
Location : substringsBetween
Killed by : org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringsBetween_StringStringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::substringsBetween to ( if (x != null) null else throw new RuntimeException ) → KILLED

8820

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
negated conditional → KILLED

8821

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::swapCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

8827

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
changed conditional boundary → KILLED

2.2
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
negated conditional → KILLED

8830

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
negated conditional → KILLED

8832

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
negated conditional → KILLED

8834

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
negated conditional → KILLED

8839

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
Changed increment from 1 to -1 → KILLED

8840

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
Replaced integer addition with subtraction → KILLED

8842

1.1
Location : swapCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testSwapCase_String()
mutated return of Object value for org/apache/commons/lang3/StringUtils::swapCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

8862

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
negated conditional → KILLED

8863

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
mutated return of Object value for org/apache/commons/lang3/StringUtils::toCodePoints to ( if (x != null) null else throw new RuntimeException ) → KILLED

8865

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
negated conditional → KILLED

8866

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
mutated return of Object value for org/apache/commons/lang3/StringUtils::toCodePoints to ( if (x != null) null else throw new RuntimeException ) → KILLED

8872

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
changed conditional boundary → KILLED

2.2
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
Changed increment from 1 to -1 → KILLED

3.3
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
negated conditional → KILLED

8874

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
Replaced integer addition with subtraction → KILLED

8876

1.1
Location : toCodePoints
Killed by : org.apache.commons.lang3.StringUtilsTest.testToCodePoints()
mutated return of Object value for org/apache/commons/lang3/StringUtils::toCodePoints to ( if (x != null) null else throw new RuntimeException ) → KILLED

8893

1.1
Location : toEncodedString
Killed by : org.apache.commons.lang3.StringUtilsTest.testToEncodedString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::toEncodedString to ( if (x != null) null else throw new RuntimeException ) → KILLED

8913

1.1
Location : toString
Killed by : org.apache.commons.lang3.StringUtilsTest.testToString()
negated conditional → KILLED

2.2
Location : toString
Killed by : org.apache.commons.lang3.StringUtilsTest.testToString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::toString to ( if (x != null) null else throw new RuntimeException ) → KILLED

8942

1.1
Location : trim
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testTrim()
negated conditional → KILLED

2.2
Location : trim
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testTrim()
mutated return of Object value for org/apache/commons/lang3/StringUtils::trim to ( if (x != null) null else throw new RuntimeException ) → KILLED

8967

1.1
Location : trimToEmpty
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testTrimToEmpty()
negated conditional → KILLED

2.2
Location : trimToEmpty
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testTrimToEmpty()
mutated return of Object value for org/apache/commons/lang3/StringUtils::trimToEmpty to ( if (x != null) null else throw new RuntimeException ) → KILLED

8994

1.1
Location : trimToNull
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testTrimToNull()
negated conditional → KILLED

2.2
Location : trimToNull
Killed by : org.apache.commons.lang3.StringUtilsTrimStripTest.testTrimToNull()
mutated return of Object value for org/apache/commons/lang3/StringUtils::trimToNull to ( if (x != null) null else throw new RuntimeException ) → KILLED

9029

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED

9092

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
changed conditional boundary → KILLED

2.2
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
negated conditional → KILLED

9095

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
changed conditional boundary → KILLED

2.2
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
negated conditional → KILLED

9098

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
negated conditional → KILLED

9099

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED

9101

1.1
Location : truncate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
negated conditional → KILLED

9102

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringIntInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED

9104

1.1
Location : truncate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
negated conditional → KILLED

9105

1.1
Location : truncate
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringIntInt()
Replaced integer addition with subtraction → KILLED

3.3
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
Replaced integer addition with subtraction → KILLED

4.4
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
negated conditional → KILLED

9106

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED

9108

1.1
Location : truncate
Killed by : org.apache.commons.lang3.StringUtilsTest.testTruncate_StringInt()
mutated return of Object value for org/apache/commons/lang3/StringUtils::truncate to ( if (x != null) null else throw new RuntimeException ) → KILLED

9134

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

2.2
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

9135

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnCapitalize()
mutated return of Object value for org/apache/commons/lang3/StringUtils::uncapitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED

9140

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

9142

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnCapitalize()
mutated return of Object value for org/apache/commons/lang3/StringUtils::uncapitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED

9147

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
Changed increment from 1 to -1 → KILLED

9148

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
changed conditional boundary → KILLED

2.2
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
negated conditional → KILLED

9150

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
Changed increment from 1 to -1 → KILLED

9151

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
Replaced integer addition with subtraction → KILLED

9153

1.1
Location : uncapitalize
Killed by : org.apache.commons.lang3.StringUtilsTest.testReCapitalize()
mutated return of Object value for org/apache/commons/lang3/StringUtils::uncapitalize to ( if (x != null) null else throw new RuntimeException ) → KILLED

9181

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
negated conditional → KILLED

2.2
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
negated conditional → KILLED

9182

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9185

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
Replaced integer subtraction with addition → KILLED

2.2
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
negated conditional → KILLED

3.3
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
negated conditional → KILLED

9187

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
Replaced integer subtraction with addition → KILLED

9188

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
negated conditional → KILLED

9189

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9193

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9222

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
negated conditional → KILLED

2.2
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
negated conditional → KILLED

9223

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9226

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
negated conditional → KILLED

2.2
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
negated conditional → KILLED

9230

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
negated conditional → KILLED

2.2
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
negated conditional → KILLED

9231

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
Replaced integer addition with subtraction → KILLED

2.2
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9235

1.1
Location : unwrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testUnwrap_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::unwrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9260

1.1
Location : upperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testUpperCase()
negated conditional → KILLED

9261

1.1
Location : upperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testUpperCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

9263

1.1
Location : upperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testUpperCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

9283

1.1
Location : upperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testUpperCase()
negated conditional → KILLED

9284

1.1
Location : upperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testUpperCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

9286

1.1
Location : upperCase
Killed by : org.apache.commons.lang3.StringUtilsTest.testUpperCase()
mutated return of Object value for org/apache/commons/lang3/StringUtils::upperCase to ( if (x != null) null else throw new RuntimeException ) → KILLED

9298

1.1
Location : valueOf
Killed by : org.apache.commons.lang3.StringUtilsValueOfTest.testValueOfCharEmpty()
negated conditional → KILLED

2.2
Location : valueOf
Killed by : org.apache.commons.lang3.StringUtilsValueOfTest.testValueOfCharEmpty()
mutated return of Object value for org/apache/commons/lang3/StringUtils::valueOf to ( if (x != null) null else throw new RuntimeException ) → KILLED

9324

1.1
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringChar()
negated conditional → KILLED

2.2
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringChar()
negated conditional → KILLED

9325

1.1
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9328

1.1
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9362

1.1
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringString()
negated conditional → KILLED

2.2
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringString()
negated conditional → KILLED

9363

1.1
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9366

1.1
Location : wrap
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrap_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrap to ( if (x != null) null else throw new RuntimeException ) → KILLED

9395

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
negated conditional → KILLED

2.2
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
negated conditional → KILLED

9396

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

9398

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
Replaced integer addition with subtraction → KILLED

9399

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
negated conditional → KILLED

9403

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
Replaced integer subtraction with addition → KILLED

2.2
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
negated conditional → KILLED

9406

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringChar()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

9439

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringString()
negated conditional → KILLED

2.2
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringString()
negated conditional → KILLED

9440

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

9442

1.1
Location : wrapIfMissing
Killed by : none
Replaced integer addition with subtraction → SURVIVED

2.2
Location : wrapIfMissing
Killed by : none
Replaced integer addition with subtraction → SURVIVED

9443

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringString()
negated conditional → KILLED

9447

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringString()
negated conditional → KILLED

9450

1.1
Location : wrapIfMissing
Killed by : org.apache.commons.lang3.StringUtilsTest.testWrapIfMissing_StringString()
mutated return of Object value for org/apache/commons/lang3/StringUtils::wrapIfMissing to ( if (x != null) null else throw new RuntimeException ) → KILLED

Active mutators

Tests examined


Report generated by PIT 1.4.2